摘要:
代码 --sql多条相似内容取一条 --首先创建测试数据 if object_id('tempdb..#t') is not null drop table #t create table #t ( time int, total int, name varchar(50) ) insert int 阅读全文
摘要:
查询包含某字段的所有表 select object_name(id) objName,Name as colName from syscolumns where (name like'%你要查询的字段名%') and id in(select id from sysobjects where xty 阅读全文
摘要:
获取数据库表结构 select a.COLUMN_NAME,a.DATA_TYPE,a.CHARACTER_MAXIMUM_LENGTH,b.value from information_schema.COLUMNS as a left join sys.extended_properties as 阅读全文