mysql显示以下查询的以下问题
错误是:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'varchar(200)) AS row From #__categories Union all Select id, title' at line 3
查询:
With cte
As
(Select id, title,patern_id, Cast(row_number() over (order by id) AS varchar(200)) AS row
From #__categories
Union all
Select id, title,patern_id,cte.row + Cast(row_number() over (order by id) as varchar(200)) as row
From #__categories a
Join cte c on (a.patern_id =c.id)
)
Select *
From cte
Order by row
有人可以告诉我什么是problam吗?
mysql版本:8.0.15
php:7.3.2