Forums

Update my MySQL database

Hi,

Please Update my MySQL database to version 8 or the latest.

I want to use the Row_Number function inside select Statement. and other partition commands.

Thanks much

We do no have MySQL 8 database servers available.

Okey so only in version 8 that ROW_NUMBER() built in function works. Do you know how the code below work in older version. I tried this table bash and it works. but when I tried in python py file it get error in the SET statement. see below code. Thanks.

SET @row_number = 0; 
SELECT 
    (@row_number:=@row_number + 1) AS num, 
    id, 
    FullName
FROM
    Voters
ORDER BY id
LIMIT 5;