Hi,
I have to write a query which should do the following task
select SID from v$session where username = 'some user'
and if there is any SID by that particular username then kill that SID using the command below :
alter system kill session 'sid';
What I have wrtten currently is the following :
alter system kill session
where sid = select sid from v$session where username = 'some user'
This query fails when there is no particular sid by that username
The query has to be such that there is no usage of curly braces '{' or '}'
And the query should be just a single line query, no multiple line queries.
The DB is ORACLE10g
Any suggestions??