Every derived table must have its own alias ——异常
来源:互联网 发布:linux 查找匹配字符串 编辑:程序博客网 时间:2024/05/21 10:53
今天在mysql 里面写了一个小例子,一个不小心爆了这小异常。
异常图:
我的sql语句:
select count(*) from( select a.*, case when a.status='00' then '未提交' when a.status='01' then '待入库' when a.status='02' then '已入库' else '未知' end as status_msg,
case when a.pay_status='00' then '未通知' when a.status='01' then '已通知' when a.status='02' then '已付款' else '未知' end as status_msg,
(select proj_no from proj where id = a.proj_id) proj_no,
(select proj_name from proj where id = a.proj_id) proj_name,
(select custom_name from cust_custom_info where id = a.supplier_id ) supplier_name
from cooperation_order as a )
呵呵,这里同样的case then 的地方出错了,就是在第二个地方有问题,把 case when a.pay_status='00' then '未通知‘ 的status都改为 a.pay_status 还有后面的status_msg,改一个名字就好了!这样的小异常,写sql语句的时候检查一下就可以避免的!给大家一个小小的参考了!
- Every derived table must have its own alias ——异常
- Every derived table must have its own alias
- MySQL错误:Every derived table must have its own alias
- Every derived table must have its own alias
- [Err] 1248 - Every derived table must have its own alias
- mysql出现“Every derived table must have its own alias”
- 【mysql】Every derived table must have its own alias
- every derived table must have its own alias
- mysql错误 Every derived table must have its own alias
- 5.4mysql Every derived table must have its own alias
- 错误代码: 1248 Every derived table must have its own alias
- Every derived table must have its own alias
- Mysql错误:Every derived table must have its own alias
- mysql 提示:Every derived table must have its own alias
- Every derived table must have its own alias
- Every derived table must have its own alias(sql语法错误)
- Every derived table must have its own alias
- com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Every derived table must have its own alias
- URAL 1966
- MyEclipse启动不了,出现“Java was started but returned exit code=13
- 算法竞赛入门经典第二章【小结与习题】
- USB键盘
- 大型网站如何做301重定向的策略
- Every derived table must have its own alias ——异常
- hashCode
- 编译期确定类型关系
- 环境变量的配置导致无法登录
- SQL Server安装程序遇到以下错误:MsiGetProductInfo无法检索 Product Code 为“{}”的包的ProductVersion.错误代码:1
- http协议GET方式获取图片
- 兼容ie8的tab选项卡
- 无聊耍博客~~
- HTML5的沿革提供了一些新的元素和属性