Mysql variables in Native Queries?

It seems it not possible to use @running_total:=@running_total in a Native Query on a MySQl Database.

I get this wrong syntax error :
grafik .

Example query:

select @running_total:=@running_total + 1 AS test;

Hi @toink
Metabase does not support multiple statements in the same query: - upvote by clicking :+1: on the first post
There are some workarounds for MySQL - see the comments.

1 Like