-- 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 procedureas
begin
Print 'My name is ashok'
print 'I am working as Software Developer' -- write your code
print ''print 'I am working as Software Developer' -- write your code
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 Myinfas
begin
Print 'My name is ashok'
print 'I am working as Software Developer'
print 'Technology:C#,Asp.net,Sql server'
end
execute Myinfo

Join the conversation! Your thoughts help the community grow.