Saminnet-Search Article Wiki Forum Piwigo SNS Cloud vtiger Sugar
DB2 View

  • Oracle
    • WebLogic Reset (211) Tue04,11:01am

      WebLogic起動するたびにユーザ名とパスワードを聞いてきて煩わしかったので回避したメモ。     securityフォルダを作成     $ mkdir $DOMAIN_HOME/servers/AdminServer/security     boot.propertiesを作成    boot.properties     username=weblogic    password=password     ※平文でOK     nohup & でWeblogicを起動     $ nohup sh $DOMAIN_HOME/startWebLogic.sh &     ※nohup.outに吐かれるのがいやだったら適当にリダイレクトさせる     boot.propertiesが暗号化されてることを確認     $ ca…

      Read More...

DB2 View

This chapter describes introduction of views, creating, modifying and dropping the views.

Introduction

A view is an alternative way of representing the data stored in the tables. It is not an actual table and it does not have any permanent storage. View provides a way of looking at the data in one or more tables. It is a named specification of a result table.

Creating a view

You can create a view using the following syntax:

Syntax:

db2 create view <view_name>(<col_name>,<col_name1...)asselect<cols>.. 
from<table_name>

Example: Creating view for shopper.sales1 table

db2 create view view_sales1(id, itemname, qty, price) 
asselect id, itemname, qty, price from 
shopper.sales1  

Modifying a view

You can modify a view using the following syntax:

Syntax:

db2 alter view <view_name> alter <col_name> 
add scope <table_or_view_name>

Example: [To add new table column to existing view ‘view_sales1’]

db2 alter view view_sales1 alter id add 
scope shopper.sales1  

Dropping the view

You can drop a view using the following syntax:

Syntax:

db2 drop view <view_name>

Example:

db2 drop view sales1_view  

Add comment


Category Database

TweetTweet Share on LinkedInShare on LinkedIn Share on Google+Google+ Submit to RedditReddit Publish on WordPress WordPress Send emailSend email