DELETE FROM

Please tell me how can i delete a row from two table

for example :

i have tables(1) Department(2) Login

where Department table has fields like

i) deptID (PK)

ii) deptName

and Login table has fields like

i) deptID (FK)

ii) password

and both these table have relationship

Now what i want to do is to delete a row from both tables .

i have written query like

DELETE FROM Department,Login WHERE deptId =?

but it gave Error.

so plz tell me how can i delete row from two tables.

thanks

[581 byte] By [khan_vu2007a] at [2007-11-27 9:27:49]
# 1
DELETE FROM Login WHERE deptID = ?; DELETE FROM Department WHERE deptID = ?
aniseeda at 2007-7-12 22:30:53 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...