查询MSSQL中test数据库A表中各字段的数据类型
追问:报错 “将VARCHAR值'S'转换为数据类型为TINYINT的列时发生语法错误”
————————MSSQL 2000平台
追问:报错 “将VARCHAR值'S'转换为数据类型为TINYINT的列时发生语法错误”
————————MSSQL 2000平台
答案:use test
go
select a.name 字段名称,c.name 数据类型,a.length 长度 from syscolumns a
join sysobjects b on a.id=b.id
join systypes c on a.xtype=c.xtype
where b.name='A' and c.status<>3