Quote Originally Posted by tamilselvan
You did not get what I am indirectly saying.
When a table has a PK that has 2 columns, your SQL will not work or will give wrong result.

Let us say PK is on 2 columns - both are varchar2. The SQL I expected:
Select max(pk_col_1), max(pk_col_2) from my_table.
OR
select max(pk_col_1||pk_col_2) from my_table.

And so on ....

Tamil
It will not create as you have listed but it will do as:

select max(pk1) table1
select max(pk2) table1
select max(pk1) table2
select max(pk2) table2
select max(pk3) table2