Thanks for the question, Pankaj.
Asked: April 23, 2020 - 8:35 am UTC
Last updated: April 24, 2020 - 3:12 am UTC
Version: Oracle 11g
Viewed 1000+ times
SQL> create table t1 ( x int ); Table created. SQL> create table t2 ( x int ); Table created. SQL> create table t3 ( x int ); Table created. SQL> create table t4 ( x int ); Table created. SQL> SQL> alter table t2 add created date; Table altered. SQL> SQL> alter table t3 add created date; Table altered. SQL> alter table t3 add modified date; Table altered. SQL> SQL> alter table t4 add created date; Table altered. SQL> alter table t4 add modified date; Table altered. SQL> alter table t4 add whom varchar2(10); Table altered. SQL> SQL> SQL> select t.table_name, tc.cnt 2 from user_tables t, 3 ( select table_name, count(*) cnt 4 from user_tab_columns 5 where column_name in ('CREATED','MODIFIED','WHOM') 6 group by table_name 7 ) tc 8 where t.table_name = tc.table_name(+) 9 / TABLE_NAME CNT ------------------------------ ---------- T1 T2 1 T3 2 T4 3 4 rows selected. SQL> SQL> SQL>
A reader, April 24, 2020 - 6:32 am UTC
The Oracle documentation contains a complete SQL reference.