SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
CREATE OR REPLACE FUNCTION test() RETURNS setof BIGINT AS $$ BEGIN RETURN QUERY SELECT 1::BIGINT WHERE 1 = 2; IF NOT FOUND THEN RETURN QUERY SELECT 2::BIGINT; END IF; END $$ LANGUAGE plpgsql; SELECT * from test();

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear