Delete Statement
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Delete Statement

  1. #1
    Join Date
    Jan 2001
    Posts
    642
    Hi,
    Can't I use the joins in the delete statement. If possible, could someone give me the syntax for deleting from table a and table b where a.account_num = b.account_num.

    Badrinath

  2. #2
    Join Date
    Nov 2000
    Location
    Israel
    Posts
    268
    you can use sub-select in delete clause provided the sub-select returns only one value:

    delete from b
    where account_num = (select a.account_num from a,b
    where a.account_num = b.account_num);

Posting Permissions

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



Click Here to Expand Forum to Full Width