Skip to content
Advertisement

Tag: postgresql

Select in return for postgres query

is it possible to add a select in a return statement? I tried adding the select name from skills where skill_id = 1 but not sure if this is possible or I just don’t have the syntax right. Answer Yes, that is possible, but you have to enclose a subquery in parentheses:

Oracle decode equivalent function to Postgres

So, I’m in migrating database from oracle to Postgres, and this is my error: and here’s my code : do you have any clue? From what I’ve read, some say to replace the decode function with COALESCE, but I don’t have any idea how the syntax is. Answer You could use a standard case expression:

Advertisement