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

Posted on    October-15-2010 12:00 AM

 MSSQL Server MSSQL Server 
 3 Answer(s)
  1454  View(s)
Rate this:

Pushpendra Singh

Total Post:241

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

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)

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

vediappan ks
vediappan ks

Total Post:3

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