文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>动态sql语句基本语法--Exec与Exec sp_executesql 的区别

动态sql语句基本语法--Exec与Exec sp_executesql 的区别

时间:2010-10-19  来源:PointNet

-----------------------

@maxnum  int  output --最大数量

 

declare @idcount int --用于存储 exec 语句赋值的变量

declare @maxpagesql  nvarchar(300)  --一定要nvarchaar


set @maxpagesql = 'select  @idcount=count(id) from QuestionInfo where 1=1 '

 

exec  sp_executesql  @maxpagesql,N'@idcount   int   output ',@maxnum   output 
select @maxnum
相关阅读 更多 +
排行榜 更多 +
别惹神枪手安卓版

别惹神枪手安卓版

冒险解谜 下载
坦克战争世界

坦克战争世界

模拟经营 下载
丛林反击战

丛林反击战

飞行射击 下载