I'd like to set a start_date and end_date variable using the following:
DECLARE
@start_date Date
@end_date Date
SET @start_date = '2022-02-18'
SET @end_date = '2022-05-18'
The error message is:
ERROR: syntax error at or near "@"
LINE 2: @start_date Date
^
SQL state: 42601
Character: 12
What's the correct way to set and declare a variable in PostgreSQL?
Thanks!