AddaByte    Programmers' Script Repository
Free and low cost software.
spacer
Find out about our beautiful fractal backgrounds at abm-enterprises


Newsletter Signup
Name
Email
 

  DB2 SQL - Alias Use
 


Save up to 75% on software

Drive Clone

the best name in hosting


This is the extraction from DB2 for AS/400 SQL Programming
Using ALIAS Names Sometimes it is useful to have a second name for 
an existing table or view.  To refer to an AS/400 physical file 
that consists of multiple members without using an alias
name requires the use of file overrides. This override can be avoided by
creating a table alias that defines a name for the file, 
including the specific member name.
This alias name can then be used in an SQL statement as though it were a
table name. Unlike overrides, alias names are objects that exist until they are
dropped. For example, if there is a multiple member file MYLIB.MYFILE with members
MBR1 and MBR2, an alias can be created for the second member so that SQL can
easily refer to it.
CREATE ALIAS MYLIB.MYMBR2_ALIAS FOR MYLIB.MYFILE (MBR2)

When alias MYLIB.MYMBR2_ALIAS is specified on the following insert
statement, the values are inserted into member MBR2 in MYLIB.MYFILE.

INSERT INTO MYLIB.MYMBR2_ALIAS VALUES(©ABC©, 6)
  What does it do?
   no description given
 
  Features
  Added by Added Downloads Rating Popularity

  rpgivpgmr

12:57:04 PM Saturday, January 24th 2009

5

not rated

 
 
  About the file
  Size Download Rate It  

  1092 KB
  download this file
 
 
  Comments
no comments
 
  Add your comment
 Email  
 Subject  
 Comment  
 Verification code:

 
    All comments are screened by the admin prior to being posted
     
 
  Contacts
  Report Abuse