Oracle PL/SQL Quick Notes
Hi Guys, We come across few queries in oracle and pl/sql on daily development tasks which we forget/wont remember correctly sometime. This post keeps track on those items. Keep visiting this post for the regular updates.
This can be used to refresh for your oracle and pl/sql interviews as well. Feel free to add your thoughts in the comments section to keep the post updated.
How to view the procedure full source code?
Run the below query to get the procedure name, note without privileges this query will run but returns nothing even if the procedure exist.
select text from user_source where name = ‘YOUR_PROCEDURE_NAME’ order by line;
How to use reserved column name in select query:
Sometime without knowing we would have used the reserved keywords as column names like DATE, DESC ETC.
To select that from the table use that inside the double quotes with the same case as you created.
If you created as DESC then use like this,
SELECT “DESC” FROM SAMPLESCHEMA.SAMPLETABLE;
46 total views, 2 views today