只查字段:
select * from table where 1=2
或者
select top 0 * from table
查询字段及字段信息:
SELECT * FROM information_schema.COLUMNS
where TABLE_CATALOG = 'Test1' --数据库名
and TABLE_SCHEMA = 'dbo' --表schema
and TABLE_NAME = 'Table1' --表名、视图名
只查字段:
select * from table where 1=2
或者
select top 0 * from table
查询字段及字段信息:
SELECT * FROM information_schema.COLUMNS
where TABLE_CATALOG = 'Test1' --数据库名
and TABLE_SCHEMA = 'dbo' --表schema
and TABLE_NAME = 'Table1' --表名、视图名