Last answered:

04 Feb 2024

Posted on:

21 Mar 2023

1

Resolved: ROW_NUMBER() is not working

Hello,


When I'm trying to use ROW_NUMBER() it seems that MySql is not reading it properly (the line is black not blue) hence is not working. It has to do with the MySQL version? And how can I fix that?

 


The error received is: 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 '() AS row_num FROM  salaries' at line 2

The current version seems to be 5.7 as in the image:

I'm eagerly awaiting your response,

Best regards,

Andrei

5 answers ( 2 marked as helpful)
Posted on:

21 Mar 2023

0

Hello,


As I said above, the problem was with the MySQL version, after I installed the latest version, it works!


Thank you,
Andrei

Instructor
Posted on:

25 Mar 2023

0

Hi Andrei!


Thanks for reaching out and letting us about the solution of your issue, as well as letting us know that you can proceed with the course.


Good luck and please feel free to post another question should you encounter any difficulties. Thank you.
Best,
Martin

Posted on:

12 Apr 2023

0

okay

Posted on:

03 Feb 2024

0

I am Still facing the same problem even after having the latest version of MySQL.
Row_NUMBER() is not working

Instructor
Posted on:

04 Feb 2024

0

Hi Dhruv!

Thanks for reaching out.

Please refer to the following thread, where we've provided an answer (related also to the screenshots you've provided there).
https://learn.365datascience.com/question/row-number-is-not-working-21/

Hope this helps.
Kind regards,
Martin

Submit an answer