select colname from syscat.columns where tabname='t' and tableschema='s'
output is columnnames which are in part of primary key
PK1
PK2
PK3
PK4
PK5
select colname from syscat.columns where tabname ='t1' and tableschema='s'
output is columnnames which are in part of primary key for identical table .
PK1
PK2
PK3
PK4
PK5
any suggession how to compare the result of 1st querry against 2nd querry .using a script .
A sample result should help!!
Anyways, from what I imagine, try to capture table name along with the column name; sort the file and use the command "comm".
can i have sample example please ?
"comm file1 file2" gives you three columns
1-> rows only present in file1
2-> rows only present in file2
3-> rows that are common to both files
This should help you if your tables are identical and you just need to know if these two tables have same member columns in the composite primary key.
If you meant something else, plz give an example of expected output.