what is the differnce between procedure and function?
in both dml operations can work and in procedure through out
parameter you can return value ,then what is the differce?
Answer Posted / rajesh venati
1. Procedures are used to perform a particular task.
2. Procedures may or may not return a value, if u want
return a value though the OUT parameter it is possible. It
doesn't contain any RETURN key word.
3. Procedures are not valid in SELECT statement.
1. Functions are used for computation purpose.
2. Function must and should be return a value.
3. We can execute function in a SELECT statement.
-- If u use OUT or IN OUT parameters or perform any DML
operations on functions it is not valid in SELECT statement.
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Which tcp/ip port does sql server run?
How do you run a query?
Does user triggers have entry for trigger with compilation errors?
Can we use rowid as primary key?
Define union, minus, union all, intersect ?
What does trigger mean in psychology?
what are the differences among rownum, rank and dense_rank? : Sql dba
Explain the difference between cursor declared in procedures and cursors declared in the package specification?
What is indexing oracle sql?
Which sql most popular?
Why is sql important?
Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10
Is sql port 1433 encrypted?
Explain the components of sql?
What is the maximum number of rows in sql table?