对您很简单,对我很难,SQL server的存储过程中select一个表后如何得到记录数 select count(*) from #temp1 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 是啊,select count(*) from #temp1,但是这个count(*)的值如何得到? 你可以定义一个变量,比如:declare @iCount intselect @iCount=count(*) from #temp1 sybase里有@@rowcount可以表示,不知道sql-server里有没有,或者想前面的老兄说的,declare @var intselect @var=count(*) from #temp1然后判断不就行了! sql server 有@@rowcount ,可以这样select * into #temp1 from table1print @@rowcount打印出的就是你要的记录数! 又来送分 sql 简单中的查询,来解决一下... 多用户下主从表插入,用@@IDENTITY返回新插入的标识列的值,后插入从表,这样是不是最安全的方法 十万火急!!求教 求助!数据报表的一个实现问题 sina和google等搜索网站为什么这么快就可以进行全文检索? DB2 6.1 for NT 如何恢复数据库 关于非结构化数据库 oracle里面有没有象sql server里面的@@rowcount变量!谢谢了 这个难吗?请指点。 关于工资管理系统的建库问题 为什么在存储过程中调用另一存储过程时,会出错,要求另一存储过程的输出参数输入呢???
declare @iCount int
select @iCount=count(*) from #temp1
declare @var int
select @var=count(*) from #temp1然后判断不就行了!
select * into #temp1 from table1
print @@rowcount打印出的就是你要的记录数!