
你的意思是 怎样查看创建
存储过程的
语句吗?\x0d\x0a首先要知道 存储过程名称 用 \x0d\x0asp_helptext 存储过程名\x0d\x0asp_helptext 视图名\x0d\x0asp_help 表名\x0d\x0a在sql server 语句离执行就可以看到\x0d\x0a还可以 找到该数据库 -可编译性-存储过程-找到存储过程名称-右击-修改\x0d\x0a就可以查看了可以用sql语句来查询, 像
你的例子可以这样:select count(1) from sysobjects where name = "sp_a" and type = "P"\x0d\x0a如果return 1 表示这个存储过程存在\x0d\x0a如果你想查用户表也可以用上面的SQL,不过type = "U"\x0d\x0aselect count(1) from sysobjects where name = "table name" and type = "U"\x0d\x0a希望对你有用--下面这条语句可以查看存储过程具体代码
exec sp_helptext 存储过程名
--下面这条语句查看数据库中有哪些存储过程
select * from sysobjects where type='P'
评论列表(0条)