Skip to content

Instantly share code, notes, and snippets.

@siassaj
Last active August 5, 2019 09:21
Show Gist options
  • Save siassaj/c5d19d5e4f6c4a6626e10abe90cece5a to your computer and use it in GitHub Desktop.
Save siassaj/c5d19d5e4f6c4a6626e10abe90cece5a to your computer and use it in GitHub Desktop.
INSERT INTO customers (primary_contact_id, company_name, created_at, updated_at)
SELECT user_id, account_name, current_timestamp as the_timestamp FROM account_named_users
VALUES (user_id, account_name, the_timestamp, the_timestamp);
-- ERROR: table "values" has 2 columns available but 4 columns specified
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment