Hi, I am trying to assign number of row as integer Tried 1 maz int :=(SELECT count(col1) FROM table WHERE col1 = quote_literal(in val1)); Tried 2 EXECUTE 'SELECT count(col1) FROM table WHERE col1 = quote_literal(val1) INTO maz'; getting error INTO Regards Chirag View this message in context: unable to assign value to variable in plpgsql Sent from the PostgreSQL - novice mailing list archive at Nabble.com.
SELECT INTO int count(*) FROM table WHERE col1 = val1;
or
int := (SELECT count(*) FROM table WHERE col1 = val1);