select table_name from user_tab_columns where column_name = '字段名'; 这是网上查到的,地址如下:http://blog.163.com/pei_hua100/blog/static/80569759201272114619283/,但当时一直未能实现,原因是字段名是区分大小写的,比如BM不能写成bm,以后注意.
SELECT 'list.add("' || t.dummy || '");' as listFROM dual t where rownum < 600; 执行结果: SELECT '''' || t.dummy || ''',' as 查询出的字段加引号FROM dual t where rownum < 600; 执行结果:
select a.TABLE_NAME as "TableName", then 'V' else 'U'end as "TableType", a.COLUMN_NAME as "ColumnName", A.COLUMN_ID as "ColumnIndex", a.DATA_TYPE as "DataType", case when a.DATA_TYPE = 'NUMBER' then case w
select count(*) from (select count(*) from 表名称 group by 多种数据量 ) 表名; 举个栗子: 比如说我有一个数据类型的字段, 里面有很多种的数据类型. 而且每个数据类型都有近些年的数据. 就是有很多重复的数据类型的数据. 我的目的就是查询出 数据类型的个数. 先查询出不重复的数据类型. select count(*) from 表名称 group by SJLX; 然后我们在用count(*) 查询这些条目数的总个数. select cou
Select Name from syscolumns Where ID=OBJECT_ID('表名') select * from information_schema.tables WHERE TABLE_TYPE='BASE TABLE' OR TABLE_TYPE='VIEW' select * from information_schema.views select * from information_schema.columns
select A.* from tb_mend_enrol A, (select A.Typeid, A.address from tb_mend_enrol A group by A.Typeid, A.address having count(A.Typeid) >= 2 and count(A.address) >= 2 ) B where A.Typeid = B.Typeid and A.address = B.address and a.reporter='测试' and A.re