首页 > 代码库 > mysql delete 别名问题 (转)

mysql delete 别名问题 (转)

mysql delete 别名问题 - 流星焰的日志 - 网易博客 http://wzl3585493.blog.163.com/blog/static/7615611020126188377970/

 

     delete from student s where s.id in (1,2,3);(执行失败)

    

     select s.* from student s where s.id in (1,2,3);(执行成功)

  

结果处理:

 

      1.不用别名

  如:

      delete from student where id in (1,2,3);(执行成功)

      2.在delete后也加入别名

  如:

      delete s from student s where s.id in (1,2,3);(执行成功)

mysql delete 别名问题 (转)