Error in CTE when using row_number() in mysql. I don't know why the error is showing up

51 Views Asked by At
WITH
team as (
        select 
        row_number() over() as id,
        team_code,
        team_name
        from teams
)

I got this error :- [12:06:32 WITH team as ( select row_number() over() as id, team_code, team_name from teams ) Error Code: 1064. 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 '' at line 8 0.000 sec]

I have no clue why was there an error.

0

There are 0 best solutions below