Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Querying system catalog tables to determine table alias

In order to determine the alias of a table in DB2 on i, you can query the system catalog tables. AS/400 expert Kent Milligan shares how.

How do I know the current alias of the table in DB2 UDB environment? Since the database has three physical tables -- Tablename_1, Tablename_2 and Tablename_3. I need to query on the table that is currently pointing. Can an SQL query help me?
On DB2 for i, this can be done by querying the system catalog tables with a query like the following:

SELECT base_table_name, 

FROM qsys2.systable
WHERE table_type='A'
and table_name='MYALIAS';

Dig Deeper on DB2 UDB (universal databases)