[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 630
  • Last Modified:

what is meant by stored procedure

what is meant by stored procedure

when we go for stored procedure and what purpose we go for stored procedure

could you please give me the simple example how to call and how to execute the stored procedure in sybase

0
Manikandan Thiagarajan
Asked:
Manikandan Thiagarajan
3 Solutions
 
tigin44Commented:
stored procedures are group of sql syntax designed to do some business logic.

here is a detatiled information about sybase stored procedure creation and usage..

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.sqlug/html/sqlug/sqlug668.htm
0
 
Pratima PharandeCommented:
A stored procedure is a named collection of SQL statements or control-of-flow language. You can create stored procedures for commonly used functions and to increase performance.

refer

http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@Generic__BookTextView/42726;pt=42621
0
 
jlsilva01Commented:
Let´s go...

Example to create a stored procedure::
create procedure pr_teste (@banco sysname) as
begin
        select * into #t_processes from master..sysprocesses
        select * from #t_processes where dbid = db_id(@banco)
end
go
grant execute on pr_teste to public
go

Example do call the stored procedure above:
execute pr_teste 'banco_de_dados'
go
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now