请教查询的问题
oracle吧
全部回复
仅看楼主
level 2
各位大大,请教一下,假如a表里面有100个字段,我想用其中的99个,只排除某一个字段,比如字段9,有什么简单的查询写法么?而不是一个个字段写出来。然后继续问,有什么写法可以排除某种类型的字段,比如排除掉所有的大字段?
2019年07月01日 08点07分 1
level 2
select 'select ' || wm_concat(column_name) || chr(10) || 'from table_name'
from user_tab_columns
where table_name = 'TABLENAME'
and column_name<>'COLUMN_NAME';
select 'select ' || wm_concat(column_name) || chr(10) || 'from table_name'
from user_tab_columns
where table_name = 'TABLENAME'
and data_type<>'COLUMN_TYPE';
2019年07月09日 06点07分 4
谢谢大佬,我去试试,还以为这贴没人回了
2019年07月24日 00点07分
1