1. 程式人生 > >查詢oracle資料庫表中是否存在系統關鍵字

查詢oracle資料庫表中是否存在系統關鍵字

今天在工程中遇到“ORA-01747: user.table.column, table.column 或列說明無效”的報錯情況,查了一下是由於資料庫列名起的不好引起的,名字用到了資料庫的關鍵字。

 select *

from v$reserved_words
where keyword

in(

select COLUMN_NAME

from all_tab_columns

where table_name = '表名大寫' and owner='使用者名稱大寫'

);

ID可以忽略