0

I'm using Postgresql 9.6 version

I want to use an user value like "declare"

DECLARE @Val1 INT
SET @VAL1 = 123
SELECT @Var1 [INT]

But it's impossible to use the "Declare" definition at PostgreSQL. How to I use an user value in simple?

Serg
  • 22,285
  • 5
  • 21
  • 48
  • I'm using it in a function in pg13 - ``` CREATE OR REPLACE FUNCTION fn_something(varchar(128), boolean) RETURNS TABLE ( xx name, yy text, curr_owner text, zz text) AS $func$ DECLARE var_1 ALIAS FOR $1; var_2 ALIAS FOR $2; BEGIN ``` – Manu Manjunath Jun 16 '21 at 07:53
  • What is a "user value"? Why is "declare" a value? Why is it not possible to use declared values in PostgreSQL? What does it mean to use anything in "simple"? – ceving Jun 16 '21 at 08:07

0 Answers0