Skip to content

Instantly share code, notes, and snippets.

@antico5
Created May 18, 2018 14:02
Show Gist options
  • Save antico5/19f5a25bb1c4b05706092436a279880c to your computer and use it in GitHub Desktop.
Save antico5/19f5a25bb1c4b05706092436a279880c to your computer and use it in GitHub Desktop.
Update on joined table PostgreSQL
Delivery.connection.update('UPDATE deliveries AS d SET customer_num = u.customer_num FROM users AS u WHERE d.customer_id = u.customer_id')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment