Home » SQL & PL/SQL » SQL & PL/SQL » select from a table minus other table?
select from a table minus other table? [message #355834] Mon, 27 October 2008 19:55 Go to next message
mlotfi
Messages: 3
Registered: October 2008
Junior Member

Hi,

I have two select statment that are working fine getting data from two tables :

To get all roles:

SELECT roles

FROM dba_roles

WHERE ROLE LIKE 'COEUS%' AND ROLE NOT IN ('COEUSWEB', 'COEUSUSER');


To get all roles for user:

SELECT roles

FROM dba_role_privs

WHERE grantee = upper(as_userid);


How to have a select statment that have all roles from dba_roles table minus the roles dba_role_privs for a user ?

Thanks, your help is appreciated.
Re: select from a table minus other table? [message #355840 is a reply to message #355834] Mon, 27 October 2008 22:59 Go to previous message
Barbara Boehmer
Messages: 8631
Registered: November 2002
Location: California, USA
Senior Member
http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/queries004.htm#i2054381
Previous Topic: Join one-to-many fields in a single row
Next Topic: parse ';' from list of strings and return the substring
Goto Forum:
  


Current Time: Mon Dec 05 14:48:53 CST 2016

Total time taken to generate the page: 0.09494 seconds