View previous topic :: View next topic
|
Author |
Message |
hisathishkumar
New User
Joined: 27 Nov 2007 Posts: 1 Location: HYDERABAD
|
|
|
|
I have a question regarding catalog tables...
which of the following will affect the catalog tables??
A) ALTER
B)DROP
C)SELECT |
|
Back to top |
|
|
zero
New User
Joined: 01 Dec 2007 Posts: 21 Location: Hyderabad
|
|
|
|
Hi,
catalog tables are nothing but system tables which are used by DB2 to store metadata (Information about tables - the different columns in a table, their definitions, their properties like unique key, nullability ... , tablespaces, indexes, views and other objects).
Below are a few of the DB2 catalog tables :
SYSTABLES :
SYSTABSTATS :
SYSCOLUMNS :
SYSINDEXES :
SYSKEYS :
SYSFOREIGNKEYS
above tables are used for different purposes.
now, coming to your question,
ALTER - this is used to modify the structure of the table. like, adding a column, increasing the size of CHAR field,
...
so, i think, ALTER will definitely affects catalog tables.
DROP - dropping a table means all the information of the table is removed from the before said tables. so, DROP also affects catalog tables.
SELECT - SELECT statement just uses the catalog information in catalog tables while fetching data from tables. so, it does not affect catalog tables.
hope this helps,
thanks,
zero |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
|
|
|
|
Select can also be used to affect the system tables
SELECT INTO SYSIBM.SYSCOLUMNS
would definetly affect that table. |
|
Back to top |
|
|
Debraj Roy
New User
Joined: 20 Dec 2007 Posts: 1 Location: Bangalore
|
|
|
|
Can you explain what is the function of this statement:??
SELECT INTO SYSIBM.SYSCOLUMNS
Warm Regards,
Debraj |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
|
|
Back to top |
|
|
|