cfnr.net
当前位置:首页 >> sql怎样查询到不包括某个字段的所有表名 >>

sql怎样查询到不包括某个字段的所有表名

SELECT table_name FROM all_col_comments WHERE column_name NOT LIKE '%A%'; 你要的是不是这个 查询所有 不包括某个字段的所有表名

SELECT table_name FROM all_col_comments WHERE column_name NOT LIKE '%A%'; 你要的是不是这个 查询所有 不包括某个字段的所有表名

select a.name 表名,b.name 列名 from sysobjects a,syscolumns b where a.id = b.id and b.name = '表名'and a.type='U' 还有一种: SELECT b.name as TableName,a.name as columnname From syscolumns a INNER JOIN sysobjects b ON a.id=b.id...

用like语句查询。 SQL Server语法如下(如查询包含spt的表) select name from sys.objects where type='U' and name like '%spt%';结果: Oracle语法如下(如查询包含test的表) select table_name from user_tables where table_name like '%T...

1、在Oracle中,这样写就可以解决了 select column_name,table_name from user_tab_columns where column_name= 'test_name' 2、在SqlServer中,这样写就可以解决了 SELECT COLUMN_NAME,TABLE_NAME FROM INFORMATION_SCHEMA.columns WHERE COLUM...

你是要写代码生成器么? --这是查表的数量 Select [name] from sysObjects Where xtype='U'and [name]'dtproperties' Order By [name] --得到数据库中所有用户视图 Select [name] From sysObjects Where xtype='V' And [name]'syssegments' And [...

应该是不需要存储过程的。下面通过查找字段名为姓名为例。1.select OBJECT_NAME(id) from syscolumns where id in(select id from sysobjects where type='U')and name='姓名'2.第二个问题更简单了select OBJECT_NAME(id) from syscolumns where...

--Oracleselect table_name from user_tab_cols where column_name='BOX';--Sql Serverselect name from sysobjects where id in (select id from syscolumns where name='BOX');

select a.name 表名,b.name 列名 from sysobjects a,syscolumns b where a.id = b.id and b.name = '表名'and a.type='U' 还有一种: SELECT b.name as TableName,a.name as columnname From syscolumns a INNER JOIN sysobjects b ON a.id=b.id...

用sql获取数据库中所有的表名的方法: 1、oracle下:select table_name from all_tables; 2、MySQL下:select table_name from information_schema.tables where table_schema='csdb' and table_type='base table'; 3、sql server下:select nam...

网站首页 | 网站地图
All rights reserved Powered by www.cfnr.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com