How to create oracle SQL statement from a select query
In this post, a simple yet very powerful query is written. If anytime we need to create large number of insert/update/alter statements from existing SQL statement, we can utilize the below operator to create it successfully.
Dynamic Create kill session example:
select 'alter system kill session ('||sid||','||serial#||');' from v$session where sid in (select lo.SESSION_IDfrom gv$locked_object lo, dba_objects dowhere lo.object_id = do.object_id);
Best Wishes!!
No comments:
Post a Comment
If you have any queries/ any suggestion please do comment and let me know.