【mysql报错】[Err] 1248 - Every derived table must have its own alias
当我运行一条联合查询的sql语句时报如下错误:
[Err] 1248 - Every derived table must have its own alias,大概意思是每一张派生表必须要有自己的别名。这里加上别名即可。
原先sql:
select * from t_test t1 where t1.content like '%test%'
Union all
select * from
(select * from t_test t2 where t2.content not like '%test%' order by t2.content asc);
加上别名之后:
select * from t_test t1 where t1.content like '%test%'
Union all
select * from
(select * from t_test t2 where t2.content not like '%test%' order by t2.content asc) d;
再运行一遍之后问题解决

【mysql报错】[Err] 1248 - Every derived table must have its own alias的更多相关文章
- [Err] 1248 - Every derived table must have its own alias
问题描述 [Err] 1248 - Every derived table must have its own alias 问题原因 这句话的意思是说每个派生出来的表都必须有一个自己的别名 我的Mys ...
- MySql 1248 - Every derived table must have its own alias
执行一个sql语句,报错:1248 - Every derived table must have its own alias 提示说每一个衍生出来的表,必须要有自己的别名 执行子查询的时候,外层查询 ...
- (转载)1248 - Every derived table must have its own alias
(转载)http://hi.baidu.com/lylegend13/item/a79f17eb51f5dff7e0a5d43b 1. select count(distinct CName) fro ...
- 错误代码: 1248 Every derived table must have its own alias
1.错误描述 1 queries executed, 0 success, 1 errors, 0 warnings 查询:SELECT stu_id, (SELECT stu_name FROM t ...
- 【MYSQL】MYSQL报错解决方法: Warning: (3719, "'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8M B4 in a future release."
用python3.6.5创建mysql库时出现如下报错,虽然报错,但是数据库可以插入成功. D:\python3\lib\site-packages\pymysql\cursors.py:170: W ...
- MySQL 报错
SELECT COUNT(1) FROM (select tid from teacher where tname like '李%') 1248 - Every derived table must ...
- Every derived table must have its own alias
完整错误信息如下: Every derived table must have its own alias 三月 28, 2017 10:20:46 上午 org.apache.catalina.co ...
- mysql执行update报错 Err] 1055 - 'information_schema.PROFILING.SEQ' isn't in GROUP BY
mysql执行update报错 Err] 1055 - 'information_schema.PROFILING.SEQ' isn't in GROUP BY 今天开发的同事发来如下错误信息,最最简 ...
- sql查询报错:Every derived table must have its own alias
执行sql语句出现语法错误 Every derived table must have its own alias 翻译:每个派生表都有自己的别名
随机推荐
- September 15th, 2019. Sunday, Week 38th.
Break down these walls and come on in. 一路披荆斩棘,勇往直前. We are the only wall that stands in our way to s ...
- java基础 - 什么是hashmap的负载因子,hashmap的容量(即桶个数)为什么是2的幂次
HashMap的负载因子是指,比如容量为16,负载因子为0.75,则当HashMap的元素个数达到16*0.75=12时,触发扩容.(16和0.75是初始默认的容量和负载因子). HashMap的容量 ...
- 卸载/更新HP Client Security Manager失败的解决方案(解决错误1722:软件包存在问题……)
问题:当卸载较老版本/更新较老版本的HP Client Security Manager时可能会出现下图所示的错误: 解决方案:按Win+R键打开运行窗口,输入regedit回车进入注册表编辑器,依次 ...
- ES6 ES7 ES8 相关用法
set Set作为ES6新的数据解构(类数组),它的成员都是唯一的,因为最直接的使用场景便是去重.并.差.交集的使用.它使用的算法叫做“Same-value-zero equality”,类似精确运算 ...
- [译]Vulkan教程(32)生成mipmap
[译]Vulkan教程(32)生成mipmap Generating Mipmaps 生成mipmap Introduction 入门 Our program can now load and ren ...
- Python 从入门到进阶之路(五)
之前的文章我们简单介绍了一下 Python 的函数,本篇文章我们来看一下 Python 中的面向对象. Python从设计之初就已经是一门面向对象的语言,正因为如此,在Python中创建一个类和对象是 ...
- Kubernetes的三种探针
k8s支持存活livenessProbe和就绪readinessProbe两种探针 两种探针都支持以下三种方式 1.exec 通过执行shell命令的方式,判断退出状态码是否是0 示例 exec: c ...
- Wpf Dispatcher.BeginInvoke((Action)delegate{}));
<Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/w ...
- 网站报"组策略阻止了这个程序。要获取详细信息,请与系统管理员联系。"错误。
今天将一个测试的网站发布到阿里云虚拟主机后,访问网站报“组策略阻止了这个程序.要获取详细信息,请与系统管理员联系.”错误.如下: 但是这个错误在本地调试时是没有的. 经过调查,原来罪魁祸首是 Micr ...
- execjs使用时异常
一.异常信息(...gbk.....) UnicodeDecodeError: 'gbk' codec can't decode byte 0xa1 in position 26: illegal m ...