在oracle中搜索列名

msj*_*sam 0 sql oracle

因为有许多表有很多列,所以我需要一个查询来搜索特定表中的列名.

例:

select column_name from table where column_name like '%ID%'
Run Code Online (Sandbox Code Playgroud)

Kon*_*tin 8

对于Oracle

select COLUMN_NAME from ALL_TAB_COLUMNS 
  where TABLE_NAME='mytable' and COLUMN_NAME like '%ID%';
Run Code Online (Sandbox Code Playgroud)