How to detect if Oracle database supports auto increment?

混江龙づ霸主 提交于 2019-12-04 20:40:43

I would check the version. Oracle does have a V$SQL_FEATURE table and a DBA_FEATURE_USAGE_STATISTICS table, but neither seem to have any entries specifically about identity columns.

Here is a really hokey way you could do it...

select decode(count(*),0,'N','Y') supports_identity_flag
from dba_tab_columns
where table_name = 'DBA_TAB_COLUMNS'
and column_name = 'IDENTITY_COLUMN';
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!