Question

Asked on 2003-07-02 at 07:31:31ID: 27003580

DELETE statement

by: africaoh125

Rating6.2Good

Hi guys,

Simple delete statement help required here:

DELETE *
FROM TBL_A, TBL_B
WHERE TBL_A.ID = TBL_B.ID

Will the above query delete all records in both TBL_A and TBL_B?, because I only need to delete the records in TBL_A.

I have also tried:

DELETE *
FROM TBL_A
WHERE (SELECT * FROM TBL_A, TBL_B WHERE TBL_A.ID = TBL_B.ID)

This gives me some EXISTS keyword error, hence what I simply want is to DELETE all the records from TBL_A that has IDs that match those IDs in TBL_B.

Related Solutions

Solution

Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.

About this Solution

View This Solution - Start Your 30 Day Free Trial
Zone
general
Tags
Participating Experts
6
Solution Grade
B

Replies

 by:

Posted on 2003-07-02 at 07:37:41ID: 35598441

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: sahnias

Posted on 2003-07-02 at 07:52:45ID: 35598442

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: PsychoDazey

Posted on 2003-07-02 at 07:58:33ID: 35598443

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: david251

Posted on 2003-07-02 at 08:01:43ID: 35598444

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: HaydnH

Posted on 2003-07-02 at 08:01:46ID: 35598445

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: HaydnH

Posted on 2003-07-02 at 08:09:50ID: 35598446

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: david251

Posted on 2003-07-02 at 08:12:05ID: 35598447

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: shanesuebsahakarn

Posted on 2003-07-02 at 08:20:24ID: 35598448

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: shanesuebsahakarn

Posted on 2003-07-02 at 08:20:39ID: 35598449

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: HaydnH

Posted on 2003-07-02 at 08:23:56ID: 35598450

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: africaoh

Posted on 2003-07-02 at 08:26:40ID: 35598451

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: HaydnH

Posted on 2003-07-02 at 08:35:19ID: 35598452

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

Log In

Forgot your password?Sign up

Top Experts

  1. jimpen

    8,346

    0 points yesterday

    Profile
  2. als

    2,110

    0 points yesterday

    Profile
  3. boag2000

    2,000

    0 points yesterday

    Profile

BrowseAre you an Expert?