|
|
|
|
if object_id('name') is not null drop proc name
create proc name .... |
|
|
|
if exists(select * from sysobjects where name='存储过程_name' and xtype='p')
print 'exist' |
|
|
if object_id('存储过程_name' ') is not null
print 'exist' 或 if exists(select * from sysobjects where name='存储过程_name' and xtype='p') print 'exist' |
|
|
IF EXISTS (SELECT name FROM sysobjects
WHERE name = N'procedure_name' AND type = 'P') DROP PROCEDURE procedure_name GO CREATE PROCEDURE procedure_name |
|
|
sysobjects.type 中的几个值是什么意思?写好的存储过程,为什么sysobjects里都有记录。
|
|
|
S 表示系统表
U 表示用户表 P 表示存储过程 V 表示视图 FN 表示函数 等等还有主键、外键等 sysobjects就是保存你数据库中的表、存储过程、视图、函数这些的 |
|
|
谢谢好人,三刻有
|
|
|
为何不生成一个存储过程的脚步然后再看
|
|