1. We have moved to a new forum! There may be a few things not working properly so please let us know if you find a bug. Remember to use the bbCode [ sql ] tag for SQL statements.

Delete Question

Discussion in 'SQL - Questions and Answers' started by bubblegumsocks, Dec 15, 2008.

  1. bubblegumsocks New Member

    Hi,

    I'm a bit of a novice when it comes to SQL, so here is my problem. I have 2 tables (Table A, Table B). I want to delete records from Table A where the value in Field X does not equal a value in Field Y in Table B. Is there a nice clean way of doing this? They are both Integer fields. Thank you all in advance!!!
  2. my_s_e_l_f New Member

    delete from A where a.x not in (select y from B)

    Cheers,
    Me

Share This Page