Delete Subquery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've been able to figure how to use a delete subquery to delete all rows, but how do I use a delete subquery to delete only one row?

 

I have two tables: users and roles with the following fields:

 

Users:

userid

roleid

 

Roles:

roleid

 

I want to be able to delete a rowid from the roles table, but only if the roleid does not exist in the users table.

 

thanks

 

 


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux