How to Use Store Proceudre in SQl Server

-- Store Procedure

-- Store procedure is precompiled object in database
-- advantage of store procedure is

-- if you wnat to run some long query again and again so just take advantage of store procedure

-- eg wirte your long query into your procedure and run it into one line

eg: procedure witout parameter

create procedure Myinfo -- this is syntex to create procedure
as

begin
Print 'My name is ashok'
print
'I am working as Software Developer' -- write your code
print ''
end

execute Myinfo -- this is the way to run you procedure

--------------------------------------------------------------

if you some modification in your code so just wirte "alter" instead of create and modify your code

alter procedure Myinf
as

begin

Print
'My name is ashok'
print
'I am working as Software Developer'
print
'Technology:C#,Asp.net,Sql server'
end

execute
Myinfo
Ebook Download
View all
Learn
View all