SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: sql query help

Hybrid View

  1. #1
    SitePoint Member blur's Avatar
    Join Date
    Jul 2001
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    sql query help

    I have two tables.
    First one have 12.000 emails
    Second one have 1.700 emails.

    The first 12.000 emails contains the second 1.700 emails.

    I want to delete these 1.700 mails from First table

    How can i do that with a simple sql query ?

  2. #2
    Just Blow It bronze trophy
    DaveMaxwell's Avatar
    Join Date
    Nov 1999
    Location
    Mechanicsburg, PA
    Posts
    7,254
    Mentioned
    113 Post(s)
    Tagged
    1 Thread(s)
    Something like this should work for you.....

    Delete from Table1 where emailID in (select emailId from table2)
    Dave Maxwell - Manage Your Site Team Leader
    My favorite YouTube Video! | Star Wars, Dr Suess Style


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •