• 报错:Every derived table must have its own alias


    报错:Every derived table must have its own alias

    翻译:每个派生表都必须有自己的别名

    原因:MySQL要求每个派生表都必须有自己的别名,因为你没给它起名

    解决:给派生表起名,as tableName

    原sql语句

    select id, name, date from
    (select * from A
    union all
    select * from B
    order by date desc)
    group by id;

    修改后的sql语句

    select id, name, date from
    (select * from A
    union all
    select * from B
    order by date desc) as c
    group by id; 

  • 相关阅读:
    实现系统托盘
    MDI窗体应用
    C#窗体的常用设置
    什么是UWP应用
    关于用js写缓动 动画
    关于tab栏切换的解析
    函数
    for循环
    if语句
    js
  • 原文地址:https://www.cnblogs.com/acuii/p/10759263.html
Copyright © 2020-2023  润新知