/ 详情

MySQL查询结果添加自增序列解析报错

Backlog
Opened this issue  
2020-11-06 15:12

版本:4.0.0-RC1

无法执行以下SQL,不走相关分表逻辑:

select * from
(
select *, (@i:=@i+1) as rownum from order_audit,(select @i:=0) as it
order by add_time DESC
) as t1 where rownum =(
(
select rownum from
(
select *, (@j:=@j+1) as rownum from order_audit,(select @j:=0) as it
order by add_time DESC
) as t1
where id = 'b4e548abcfb744c1b6a7bdcf749bfc1d'
order by add_time DESC
) - 1);

异常显示:

line 15:21 no viable alternative at input '(select*,(@i'
line 15:20 no viable alternative at input '(@'
line 15:76 no viable alternative at input '(select@i'

Comments (0)

ChenBoIT created任务
展开全部操作日志

Sign in to comment

状态
Assignees
Milestones
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
Branches
Planed to start   -   Planed to end
-
Top level
Priority
参与者(1)