Skip to content
Advertisement

subquery must return only one column during insert data for returning

is that any way for returning join column during INSERT INTO ? here is my query

the last sub query is not work because i want return the villages table with two columns is that any way to pass that 2 columns ??

Advertisement

Answer

You can use a CTE with returning . . . and then a query:

However, the above is returning multiple rows for villages. Probably the best way to fix that is with proper joins:

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement