Regarding HeidiSQL I would like to set a variable to the maxdate of a table in order to use this variable as a 'WHERE'-criteria in another query.
I am using the following code
DECLARE @maxdate timestampz
SET @maxdate = (SELECT MAX("Date") FROM transactions)
SELECT maxdate
However, I get a syntax error at or near "@" in line 1. Any help is much appreciated - thank you!