adspace


What is a stored procedure in sql with example?

Answer Posted / Ramesh Chanda

"Stored Procedure": It's a prepared SQL code that can be saved and reused. To create a stored procedure, you use the CREATE PROCEDURE statement. Here's an example:

CREATE PROCEDURE CalculateAverage ( @a INT, @b INT )
AS
SELECT AVG( @a + @b )

EXECUTE CalculateAverage 5, 10

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the current version of postgresql?

1188


What is your daily office routine?

2351


how to escape special characters in sql statements? : Sql dba

1124


how to use regular expression in pattern match conditions? : Sql dba

1125


what are all the common sql function? : Sql dba

1141


Can delete statement be rollbacked?

1065


Can we rollback truncate?

1083


what is bcp? When does it used? : Sql dba

1065


What is the current version of sql?

1106


what is schema? : Sql dba

1163


Can we use distinct and group by together?

1146


how many tables will create when we create table, what are they? : Sql dba

1154


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

2099


what are the advantages of sql ? : Sql dba

1153


what is dbms? : Sql dba

1069