|
Re: Why we can not use the Oracle Procedure in an SQL Statement? [message #447124 is a reply to message #447118] |
Thu, 11 March 2010 23:25   |
 |
delna.sexy
Messages: 941 Registered: December 2008 Location: Surat, The Diamond City
|
Senior Member |
|
|
SQL statements like, SELECT is used for data retrival from database and other DML statements are used for some kind of manipulation with data.
And for this purpose, the mechanism which returns data is required.
As the procedures do not return any data, then are not useful.
While on other hand, functions return some data. That's why we can use then in SQL statements.
regards,
Delna
[Updated on: Thu, 11 March 2010 23:25] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: Why we can not use the Oracle Procedure in an SQL Statement? [message #447146 is a reply to message #447133] |
Fri, 12 March 2010 00:14   |
pablolee
Messages: 2882 Registered: May 2007 Location: Scotland
|
Senior Member |
|
|
My assumption is that yours is a purely academic question and that you are not actually wanting to usse a procedure in a SQL statement, but rather, you simply want to know why it is so.
Re your comment about OUT parameters; Because OUT parameters are not the same as the programme returning a value. You can also use out parameters in a function, but you cannot use it withing a sql query.
|
|
|
Re: Why we can not use the Oracle Procedure in an SQL Statement? [message #447149 is a reply to message #447133] |
Fri, 12 March 2010 00:45   |
 |
Michel Cadot
Messages: 68733 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
suyogsheth wrote on Fri, 12 March 2010 06:39Hi ,
Thanks for the reply.I know that Procedure can not return a value. But we can return the values by using the OUT Parameters.
So why we can not use it in a SQL Statement.?
And how a query can use an OUYT parameter of a procedure?
Just think about it and how you could write and if you find then post it here.
Regards
Michel
[Updated on: Fri, 12 March 2010 00:46] Report message to a moderator
|
|
|
|
|
|