0

Hi to all,
I created the following two table
--------------------------------------
create table mail(mid integer primary key, name varchar(20) )
create table phone( pid integer foreign key references mail(email), phone integer)
-----------------------------------------
After inserting records on both table, now i want delete perticular record from table say 'delete record of pid=12'. that means, i have to delete record of pid=12 from oth table. so, i ran following query.
-----------------------------------------------
delete from mail, phone on mail.mid=phone.pid where pid=12
------------------------------------------------
but i got the error like 'check the syntax near from', what to do then to get the proper output.


Thanks & regards,
Pooja.

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by Momerath
0

do something like this

DELETE FROM MAIL INNER JOIN PHONE ON MAIL.MID = PHONE.PID
WHERE PHONE.PID = 12
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.