how to declare variable in PostgreSQL
- by user307880
I try to declare a variable in a code like this, but it's doesn't work. Can you tell me what's the problem?
ERROR: syntax error at or near "VARCHAR"
LINE 2: p_country VARCHAR;
DECLARE
p_country VARCHAR;
p_country : = '';
SELECT p_country;