SQL help

iosoft

PC enthusiast since MS DOS 5
Skilled
Friends,

a little help.
what will be the SQL Query to list all the tables under current user/database/domain that does not have any INDEX defined on them :huh:
(should run on Oracle, MySQL, DB2)
 
Query dba_objects for all tables belonging to a schema and dba_ind_columns to check if the table has any index defined on them.

I'm not sure if the above views are available in mysql or db2.
 
should run on Oracle, MySQL, DB2 <-- i am not sure if this is possible. (ppl please correct me if i am wrong).

I dont think there is any such portable way to address administration tables... they might be different for different databases.

atleast My SQL and Oracle seem to share ALL_OBJECTS but i dont think DB2 shares it.

you might need a database gateway ???

Praveen

Edit:

"select tabschema, tabname from syscat.tables" --> DB2

"select table_name from all_tables" --> Oracle

Note sure if the comparison is right but proves my point i guess..
 
^ Main requirements are ORACLE and MySQL.

for DB2, I might have to go manual search. (24 tables)
 
Back
Top