在SQL Server数据库中,如果我们想查询某个表中特定字段含有特定字样的记录,可以使用LIKE语句配合通配符进行查询。比如我们要从student表中查询名字包含“三”字的学生的学号,可以使用以下SQL语句:select stu_id from student where stu_name like '%三%';这里,%符号是一个通配符,代表任意数量的字符...
select a.name as [column],b.name as type from syscolumns a,systypes b where a.id=object_id('表名') and a.xtype=b.xtype 把“表名”替换成你要查看字段类型的表名,比如你要查看sysobjects表的各字段...