日期:2014-05-18 浏览次数:20907 次
USE MyDB GO CREATE PROCEDURE spCKtablename @dbname VARCHAR(200) AS DECLARE @strsql VARCHAR(MAX) BEGIN SET @strsql='USE'+@dbname+'GO'+'SELECT name FROM sys.sysobjects WHERE xtype IN'+'('+'U'+')'+ 'AND type='+'U'+ 'ORDER BY name' EXEC(@strsql) END
alter PROCEDURE spCKtablename @dbname VARCHAR(200) AS DECLARE @strsql VARCHAR(MAX) BEGIN SET @strsql='USE '+@dbname+' SELECT name FROM sys.sysobjects WHERE xtype =''X''AND type=''P'' ORDER BY name' EXEC(@strsql) END
------解决方案--------------------
查看你数据库下所有存储过程,看看有没有你建立的
select * from databaseName where OBJECTPROPERTY(id, N'IsProcedure') = 1