Skip to content

Instantly share code, notes, and snippets.

@tranchausky
Last active June 3, 2024 04:23
Show Gist options
  • Save tranchausky/9c6ac34e4996ffa9e1219a488349a43e to your computer and use it in GitHub Desktop.
Save tranchausky/9c6ac34e4996ffa9e1219a488349a43e to your computer and use it in GitHub Desktop.
demo laravel upset (update/insert) need catalog_id is unique
insert into `subModel` (`catalog_id`, `name`) values ('1', 'CCC'), ('2', 'GS'), ('3', 'SX'), ('4', 'GL'), ('10', 'Home,cc') on duplicate key update `catalog_id` = values(`catalog_id`), `name` = values(`name`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment