For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > May 2004 > subquery









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author subquery
Brock Jimmy D Contr 74mdss/Sgsi

2004-05-28, 3:31 pm

I'm trying to use a delete subquery in Oracle (using SQL) and it is preventing me from deleting when no records are found in the SELECT statement.



DELETE roles WHERE roleid NOT IN (SELECT DISTINCT roleid FROM users WHERE roleid='Staff Member';



There are no records in the USERS table that has a roleid='Staff Members'



Any suggestions?





Jimmy Brock

Web Developer




Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com