DB2 Basics: Aliases

You may also like...

4 Responses

  1. Harsha says:

    Pretty much elaborate document on simple concept Alias. 🙂
    Thank you.

    I just want to add one point which should be considered while dropping alias, that make sure you are using the word ‘alias’ but not ‘table’. Earlier days when I was learning DB2 ; I was playing with aliases & found that if you give syntax as shown below the base table will be dropped instead of alias even though the information you have to db2 is related to alias.
    db2 drop table .;

    Frankly, speaking I was expecting an error saying that table doesn’t exist.

  2. Gags says:

    Hi Amber, Can the ALIAS be dropped from with in the SP like other objects.
    begin atomic
    if(exists(select 1 from syscat.tables where tabschema = ‘MYSCHEMA’ and tabname = ‘MYTABLE’)) then
    end if;

  1. July 29, 2014

    […] DB2 Basics: Aliases […]

  2. June 14, 2016

    […] DB2 Basics: Aliases […]

Leave a Reply

Your email address will not be published. Required fields are marked *