stored procedure
-
how to work with stored procedure in sqlserver
-
how to work with stored procedure in sqlserver
Stored procedures assist in achieving a consistent implementation of logic across applications. Stored procedures can also improve performance. Many tasks are implemented as a series of SQL statements. Stored procedures can also shield users from needing to know the details of the tables in the database. have a look at given links for getting references Create a Stored Procedure[^] SQL Server stored procedures tutorial[^] SQL Stored Procedures[^]
-
how to work with stored procedure in sqlserver
Stored procedure are pre-compiled object of db. they are consist of block of sql statments & procedural statements. you can call them on your db server. They accept in, out, inout parameter. Sp modify the value of out parameter and you can send them your calling enviourment as output or similar to function returned value. but you cannot use return statement in sp. sp never return value like function. means you can only use sp output parameters for returning more values. ................. eg. Create procedure YourSpNAME @para1 int, @para2 varchar(100) output AS BEGIN select @para1 set @para2 = 'output' END @declare @output varchar(100) execute YourSpNAME 1045, @output output print @output
Regards: Ganu Sharma Sql Developer ;)