Home > DeveloperSection > Interviews > What are the stored procedures?

Posted on    October-15-2010 12:00 AM

 MSSQL Server MSSQL Server 
Ratings:
 3 Answer(s)
  1285  View(s)
Rate this:

Pushpendra Singh

Total Post:241

Points:1205
Posted on    November-09-2010 1:00 AM

Stored Procedure is a set of Structured Query Language (SQL) statements with an assigned name that's stored in the database in compiled form so that it can be shared by a number of programs. The use of stored procedures can be helpful in controlling access to data, preserving data integrity, and improving productivity.

Amit Singh

Total Post:565

Points:2825
Posted on    November-09-2010 1:00 AM

Stored procedures are similar to UDFs (user defined function).The major difference is that UDFs can be used like any other expression within SQL statements.

for examples:

ALTER procedure [dbo].[ProcedureName]
@employeeid int,
@employeepass varchar(50)

as
select * from sample
where id=@id and pass=@pass

vediappan ks
vediappan ks

Total Post:3

Points:15
Posted on    January-23-2012 1:00 AM

stored procedure 2 types first one is with parameters(@companyId int select * from mcompany where companyid= @companyID) second one is without parameter (select * from mcompany)

Don't want to miss updates? Please click the below button!

Follow MindStick