Cursor [message #39827] |
Wed, 14 August 2002 11:57 |
S
Messages: 27 Registered: December 2001
|
Junior Member |
|
|
1) is commit statement allowed in a cursor?
2) What is the difference b/w functiontion & procedure?
function can return value but using an out parameter both function & procedure can return values. Hence, what is the dfference? When to use what?
|
|
|
Re: Cursor [message #39831 is a reply to message #39827] |
Wed, 14 August 2002 12:37 |
Todd Barry
Messages: 4819 Registered: August 2001
|
Senior Member |
|
|
1) Allowed but not recommended due to potential rollback segment errors ('snapshot too old').
2) Only a function can be used in a SQL statement. In general, a function returns a value (lookup) and a procedure "does something" (insert/update/delete, send an email, write to a file using UTL_FILE, etc.).
|
|
|