I am new to PostgreSQL and am using the query tool in PGAdmin. I'm trying to run pgsql queries that use variables, but I can't seem to get the syntax right.
Here's a sample query that gives a syntax error:
DECLARE
num INTEGER;
BEGIN
num := 3;
PRINT num;
END;