|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
How to find out foriegn key of table in DB2?
How to find out foriegn key of table(DB2)?
|
|
#2
|
|||
|
|||
|
find foreign key
Quote:
Different ways you can do this : 1) select substr(tabname,1,20) table_name,substr(constname,1,20) fk_name,substr(REFTABNAME,1,12) parent_table,substr(refkeyname,1,20) pk_orig_table,fk_colnames from syscat.references where tabname = 'TABLE_NAME' 2) Use the command : db2look -d <database_name> -t <table_name> -a -e -c Look for 'DDL Statements for foreign keys on Table table_name in the output. 3) Alternatively, If you have access to control center, right click on the table and select 'generate ddl'. |
![]() |
| Viewing: Dev Shed Forums > Databases > DB2 Development > How to find out foriegn key of table in DB2? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|