1SELECT column_name
2 FROM all_tab_cols
3 WHERE table_name = 'USERS'
4 AND owner = '" +_db+ "'
5 AND column_name NOT IN ( 'PASSWORD', 'VERSION', 'ID' )
6
1-- Depending on schema grants:
2SELECT * FROM USER_TAB_COLS WHERE TABLE_NAME = 'my_table'; -- User tables
3SELECT * FROM ALL_TAB_COLS WHERE TABLE_NAME = 'my_table'; -- Access granted
4SELECT * FROM DBA_TAB_COLS WHERE TABLE_NAME = 'my_table'; -- All schemas
5
6-- Columns from all tables in a schema (or USER_..., DBA_... instead of ALL_...):
7SELECT c.TABLE_NAME, c.DATA_TYPE FROM ALL_TAB_COLS c
8JOIN ALL_TABLES t ON t.OWNER = c.OWNER
9WHERE OWNER = 'my_schema';