select object_id('名称') ,object_id('名称','类型') 1. 等价于 select * from sys.objects where name ='名称' select * from sys.objects where name ='名称' and type ='类型' 2. 可用于判断表等是否存在 如: if(OBJECT_ID('rdrecord','u') is not null) print '存在' else print '不存在' 3. 可返回sys…