05 2014 档案
摘要:库是否存在ifexists(select*frommaster..sysdatabaseswherename=N'库名')print'exists'elseprint'notexists'-----------------判断要创建的表名是否存在ifexists(select*fromdbo.sys...
阅读全文
摘要:execute相信大家都用的用熟了,简写为exec,除了用来执行存储过程,一般都用来执行动态Sqlsp_executesql,sql2005中引入的新的系统存储过程,也是用来处理动态sql的, 如:exec sp_executesql @sql, N'@count int out,@id varch...
阅读全文