oracle show columns in a table code example
Example 1: oracle show column of table
SELECT * FROM USER_TAB_COLS WHERE TABLE_NAME = 'my_table';
SELECT * FROM ALL_TAB_COLS WHERE TABLE_NAME = 'my_table';
SELECT * FROM DBA_TAB_COLS WHERE TABLE_NAME = 'my_table';
SELECT c.TABLE_NAME, c.DATA_TYPE FROM ALL_TAB_COLS c
JOIN ALL_TABLES t ON t.OWNER = c.OWNER
WHERE OWNER = 'my_schema';
Example 2: oracle show column of table
SELECT column_name
FROM all_tab_cols
WHERE table_name = 'USERS'
AND owner = '" +_db+ "'
AND column_name NOT IN ( 'PASSWORD', 'VERSION', 'ID' )