https://www.prisma.io/ logo
#orm-help
Title
# orm-help
n

Nurul

09/26/2022, 3:25 PM
From @Ashe Magalhaes
Hi there! New to this channel so please redirect me if this should go elsewhere.
I’m using prisma with a mysql planetscale backend.
I’m getting an error about ROW_NUMBER() in a
prisma.$queryRaw
Something like this, which works fine on my planetscale console:
Copy code
const query = `select ROW_NUMBER() over() FROM contacts`;
Results in the error:
Copy code
Code: `1105`. Message: `unknown error: syntax error at position 26`
Anyone know why prisma can’t seem to handle
ROW_NUMBER()
function?
1
r

Raphael Etim

09/27/2022, 9:05 AM
@Ashe Magalhaes, There is no way to specifiy the mysql version in the schema.prisma file. You will have to check the mysql server version and ensure you are on version 8 in order to be able to use the
ROW_NUMBER()
function
a

Ashe Magalhaes

09/27/2022, 6:03 PM
thanks!
r

Raphael Etim

09/27/2022, 6:28 PM
You're welcome.
5 Views