Date:2013-01-01
看上面的SQL语句。
以前一直不知道原来delete后面可以直接写table
如果我们想从两个表中删除
delete user from user,post where user.id=post.user_id; /*删除user表中的相应记录*/ delete user,post from user,post where user.id=post.user_id; /*删除user表和post中的相应记录*/
允许转载, 但转载请注明出处
Date:2013-01-01
看上面的SQL语句。
以前一直不知道原来delete后面可以直接写table
如果我们想从两个表中删除
delete user from user,post where user.id=post.user_id; /*删除user表中的相应记录*/ delete user,post from user,post where user.id=post.user_id; /*删除user表和post中的相应记录*/
Support:mkdwiki