using parametrized query with variable in postgreSQL via pgAdmin

  Kiến thức lập trình
`DO 
$$ 
DECLARE lang TEXT;
    myvar dictionary_keys_view.it%TYPE;
begin 
     lang = 'it';
  SELECT INTO myvar lang FROM dictionary_keys_view WHERE key = 'ENDED';
   raise notice 'title id: %', myvar;
end;
    $$;`

When i execute this in pgadmin i receive: ” NOTICE: title id: it
DO

Query returned successfully in 101 msec.”

where’s the error? thanks in advance

i tried to declare in different ways the lang var but i never used plpgsql

New contributor

thulandar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT