I need to write a query that should perform the following task
select SID from v$session where username = 'some user'
and if this particular username is the SID, then destroy that SID using the following command:
alter system kill session 'sid';
I currently have an answer:
alter system kill session
where sid = select sid from v$session where username = 'some user'
This request fails when there is no specific sid by this username
The query must be such that there is no use of braces '{' or '}'
And the query should be just one string query, without multiple queries.
DB ORACLE10g
Any suggestions
source
share