SQL Question
Date: 13 Jun 2003 06:38:44 -0700
Message-ID: <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 - 15:38:44 CEST