我想根据学生ID删除学生记录。这是student_tbl中的primery键和所有其他表中的外键。但我没有通过;我收到了这个错误:
#1109 - 未知表格' student_tbl'在MULTI DELETE中
DELETE FROM `student_tbl`,`father`,`sponsor`, `postal`, `report` USING `student_tbl` std
INNER JOIN `father` INNER JOIN `sponsor` INNER JOIN `postal` INNER JOIN `report`
WHERE std.s_id = 1 AND father.s_id = std.s_id AND sponsor.s_id = std.s_id
AND postal.s_id = std.s_id AND report.s_id = std.s_id
答案 0 :(得分:0)
我已通过更改表student_tbl
名称及其别名来解决此问题。