Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save chandra-prakash-meghwal/c1e7d658e4004f0240c97d6223dbe2fb to your computer and use it in GitHub Desktop.
Save chandra-prakash-meghwal/c1e7d658e4004f0240c97d6223dbe2fb to your computer and use it in GitHub Desktop.
insert into one table with values some columns from another table and some other data in mysql
insert into customer_balance_logs (customer_id, credit, reason) select id, 5, 'x-mas credit' from customers;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment