DATA_DEFAULT
'为NOT NULL)。是否可以查询列名及其相应的默认数据?
答案 0 :(得分:2)
尝试:
select owner
, table_name
, column_name
, data_type
, data_length
, data_precision
, data_scale
, nullable
, data_default
from all_tab_columns
where table_name = 'your_table_name'
and data_default is not null
;
检查包含data_default列的所有表:
select owner
, table_name
, wm_concat(column_name)
, count(*)
from all_tab_columns
where data_default is not null
group
by owner
, table_name
having count(*) > 0