TSO-ISPF JCL COBOL VSAM DB2 CICS Tools Articles Job Portal Forum Quiz Interview Q&A

DB2 - SQL Create Alias Statement


The CREATE ALIAS statement defines an alias for a module, nickname, sequence, table, view, or another alias. Aliases are also known as synonyms.

Following is the alias creation syntax.

CREATE[REPLACE] ALIAS alias-name
         FOR TABLE table-name
         [FOR MODULE module-name]
         [FOR SEQUENCE sequence-name]

Example:

THe following SQL statement create an alias for a table TB_TABLE.

CREATE ALIAS SP_TAB
    FOR TB_TABLE;


If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal