时间:2021-07-01 10:21:17 帮助过:4人阅读
二、查询表(sysobjects —— select *from sysobjects where id=OBJECT_ID(‘<表名>‘))
select *from sysobjects where id=OBJECT_ID(‘StudentsInfo‘)
三、查询列(syscolumns —— select COUNT(*) from syscolumns where name=‘<列名>‘ and id=OBJECT_ID(‘<表名>‘))
select COUNT(*) from syscolumns where name=‘sname‘ and id=OBJECT_ID(‘studentsinfo‘)
四、查询存储过程或视图(select * from sysobjects where name=‘<视图或存储过程名>‘ AND type = ‘P/V‘)
SQL Server —— 查询数据库、表、列等
标签:_id img server image 存储 style 数据库 name databases