Re: SQL Question

From: Jim Kennedy <kennedy-down_with_spammers_at_attbi.com>
Date: Fri, 13 Jun 2003 14:48:30 GMT
Message-ID: <2vlGa.129766$d51.199380_at_sccrnsc01>


Which professor is this homework for?
Jim

-- 
Replace part of the email address: kennedy-down_with_spammers_at_attbi.com
with family.  Remove the negative part, keep the minus sign.  You can figure
it out.
"Ashwani Chopra" <ashwani_chopra_at_mdsaero.ca> wrote in message
news:ddff4476.0306130538.47f0471a_at_posting.google.com...

> Hi,
>
> I want to delete the data from two tables by using only SQL. My first
> table is a parent table and second one is child. The tables have the
> following columns:
>
> First Table
> dataid number(4)
> name varchar2(16)
>
> Second Table
> testid varchar2(16),
> configid varchar2(16),
> dataid number(4)
>
> The dataid of the second table is a foreign key to the first table.
> I know testid value to delete the data from the second table but I
> can't delete the data from the first table corresponding to dataid.
>
> Can we write any kind of SQL query or sub query that first deletes a
> record from the second table corresponding to testid and then delete a
> record from the first table corresponding to dataid.
>
> Any suggestions/ Comments are welcome.
>
> Thanks
> Ashwani
Received on Fri Jun 13 2003 - 16:48:30 CEST

Original text of this message