You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ WITH [ RECURSIVE ] with_query [, ...] ]
UPDATE [ ONLY ] table_name [ * ] [ [ AS ] alias ]
SET { column_name = { expression | DEFAULT } |
( column_name [, ...] ) = [ ROW ] ( { expression | DEFAULT } [, ...] ) |
( column_name [, ...] ) = ( sub-SELECT )
} [, ...]
[ FROM from_list ]
[ WHERE condition | WHERE CURRENT OF cursor_name ]
[ RETURNING * | output_expression [ [ AS ] output_name ] [, ...] ]
I'm unable to figure out how to add [ FROM from_list ] items. I'm attempting to do a simple join on the update. Attempting to build something like this:
update user_groups set role = ? from groups where user_groups.group_id = groups.id and groups.account_id = ? and user_groups.id = ?
Please don't look too much into this example. There are lots of uses for joins during update.
The text was updated successfully, but these errors were encountered:
From the postgres spec:
I'm unable to figure out how to add
[ FROM from_list ]
items. I'm attempting to do a simple join on the update. Attempting to build something like this:Please don't look too much into this example. There are lots of uses for joins during update.
The text was updated successfully, but these errors were encountered: