Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

PostgreSQL Delete records...

Posted on 2010-01-03
3
Medium Priority
?
322 Views
Last Modified: 2012-05-08
Dear Experts,

I have a table that contains all the members I want to delete from my database using the userIDs as the identifier. I need a SQL operation that will take all the userID from the table deleteusers and delete all the corresponding records from another table called allusers that has a corresponding userID.



Joel
0
Comment
Question by:Joel_Sisko
  • 2
3 Comments
 
LVL 30

Accepted Solution

by:
Reza Rad earned 2000 total points
ID: 26167111
delete from allusers
where userID in
(
select userID from deleteusers
)
0
 
LVL 12

Author Comment

by:Joel_Sisko
ID: 26167249
Awesome thanks.
0
 
LVL 30

Expert Comment

by:Reza Rad
ID: 26168539
Glad to help,
Regards,

0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question