stored procedure 菜鸟一问, PLEASE HELP,在线等# Database - 数据库
j*s
1 楼
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 o
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 o