需求:有表table如下 id name age sex
111 张三 23 男
222 22 女
我得到这张表的表头 id name age sex 请问SQL怎么写(注意不是查数据,是表头)
select ........
111 张三 23 男
222 22 女
我得到这张表的表头 id name age sex 请问SQL怎么写(注意不是查数据,是表头)
select ........
select column_name
from user_tab_columns
where table_name='DEPT'COLUMN_NAME
------------------------------
DEPTNO
DNAME
LOC
select * from user_tab_cols t where t.TABLE_NAME=upper('你的表名');另外还有all_xxx,dba_xxx视图