--查询tablename 数据库中 以"_copy" 结尾的表 select table_name from information_schema.tables where table_schema='tablename' and table_type='base table' and table_name like '%_copy'; --information_schema 是MySQL系统自带的数据库,提供了对数据库元数据的访问 --information_schema.tab…
查询tablename 数据库中 以"_copy" 结尾的表 select table_name from information_schema.tables where table_schema='tablename' and table_type='base table' and table_name like '%_copy'; information_schema 是MySQL系统自带的数据库,提供了对数据库元数据的访问information_schema.tables 指数据…
表是否存在: select count(*) from user_tables where table_name = #{tablename} 包含某个字段的表 select * from user_tab_columns where UPPER(column_name)='CREATE_TIME' 特定表是否包含字段 select * from user_tab_columns where UPPER(column_name)='CREATE_TIME' AND TABLE_NAME = 'S…
select [name] from [TPMS_PRD].[dbo].sysobjects where id in(select id from [TPMS_PRD].[dbo].syscolumns Where name='supplierid') 包含SupplierId这个字段的所有表 格式如下: select [name] from [库名].[dbo].sysobjects where id in(select id from [库名].[dbo].syscolumns Where…
select b.NativeName from sanleiDB.dbo.Dictionary_Native b where not EXISTS (select a.NativeName from Dictionary_Native a where a.NativeName = b.NativeName)union select a.NativeName from Dictionary_Native a where not exists (select b.NativeName from s…