像下面这种方式,mysql上是正常的,但是ob好像是要求我要先声明临时表的字段?
create temporary table temp select ‘1’ as a
ob下执行报:View/Table’s column refers to a temporary table not supported
像下面这种方式,mysql上是正常的,但是ob好像是要求我要先声明临时表的字段?
create temporary table temp select ‘1’ as a
ob下执行报:View/Table’s column refers to a temporary table not supported
确实不支持这种方式建临时表。暂时还请 先定义临时表 或者使用下面这种方式:
create temporary table t3 like t1;
这个问题我跟产品反馈一下。
你能否帮详细说明一下这个用法的业务场景,以及是否可以换种实现方法。
我需要先通过关联查询出来一部分临时数据给后面的查询再进行关联查询
其实就是mysql8中新增的cte语法,现在打算用临时表来代替,临时表也不能用的话那只能用子查询了吗?
好像可以用视图代替,这种做法会有什么不妥吗?
create view temp as select '1' as a