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)
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.
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
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
for examples:
ALTER procedure [dbo].[ProcedureName]
@employeeid int,
@employeepass varchar(50)
as
select * from sample
where id=@id and pass=@pass