Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 regarding stored procedure

Author  Topic 

rajeshskpm
Starting Member

10 Posts

Posted - 2009-03-13 : 04:02:54
can i return multiple rows from stored Procedure?
i mean .. suppose a table contains (empname ,city, age). I want to find out all the employees in a perticular city. can i possible to write sored procedure for that? plese reply

rajesh

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-03-13 : 04:16:59
create procedure dbo.uspGetEmployeeByCity
(
@City NVARCHAR(200)
)
AS

SET NOCOUNT ON

SELECT empname, city, age from table1 where city = @city



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -