当前在线人数11499
首页 - 分类讨论区 - 电脑网络 - 窗口里的风景版 -阅读文章
未名交友
[更多]
[更多]
文章阅读:Re: [转载] stored procedure 菜鸟一问, PLEASE HELP,在线等
[同主题阅读] [版面: 窗口里的风景] [作者:st] , 2003年10月24日15:57:44
st
进入未名形象秀
我的博客
[上篇] [下篇] [同主题上篇] [同主题下篇]

发信人: st (月光下老虎慢慢吃人), 信区: DotNet
标  题: Re: [转载] stored procedure 菜鸟一问, PLEASE HELP,在线等
发信站: Unknown Space - 未名空间 (Fri Oct 24 15:58:22 2003), 站内信件

of course, try that in your sql analyzer first,
select count(*) from user1 will return a number for the count(*)
that's one row, so you will get @[email protected]@ROWCOUNT, which is 1, :D
【 在 jingus (jing) 的大作中提到: 】
: 【 以下文字转载自 Database 讨论区,原文如下 】
: 发信人: jingus (jing), 信区: Database
: 标  题: stored procedure 菜鸟一问, PLEASE HELP,在线等
: 发信站: Unknown Space - 未名空间 (Fri Oct 24 14:52:54 2003) WWW-POST
: I want to know how many records existing in the database.
: In sql, it is
: select count(*) from customer;
: But I do not know how to get it in stored procedure.
: CREATE proc countcustom  @num Int  output
: as
: select count(*) from user1
:     select @num = @@ROWCOUNT
: return
: GO
: But num is always 1, since I do not know the meaning of @@ROWCOUNT, ( I copy
: from other examples, :-()
: I wonder somebody can help me, also is there any document or tutorai for
: stored procedure? I do not quite understand the grammar of stored procedure,
: it seems it is different with SQL.
: Thanks a lot!!!!!!!!!!!!!!!
: by the way, I use Microsoft SQl Server


--
一只小老虎慢慢的走了过来。红着脸,问小松鼠说,“请问。。。我可以吃你吗?”
小松鼠觉得这个问法蛮好玩的,说“你是第一次吃动物吗?”小老虎更不好意思了,说,
“是的。。。妈妈不在家了。。。”“那。。你以前吃什么呢?”小松鼠又好奇的问到。
“……”“什么?说大声点。。。我听不到”“吃奶!”说完,小老虎的脸更红更红了。
--[转载]月光下老虎慢慢吃人

※ 来源:.Unknown Space - 未名空间 mitbbs.com.[FROM: 204.71.]

[上篇] [下篇] [同主题上篇] [同主题下篇]
[转寄] [转贴] [回信给作者] [修改文章] [删除文章] [同主题阅读] [从此处展开] [返回版面] [快速返回] [收藏] [举报]
 
回复文章
标题:
内 容:

未名交友
将您的链接放在这儿

友情链接


 

Site Map - Contact Us - Terms and Conditions - Privacy Policy

版权所有,未名空间(mitbbs.com),since 1996