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:
https://github.com/metabase/metabase/issues/4050 - upvote by clicking :+1: on the first post
There are some workarounds for MySQL - see the comments.

1 Like