Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MyTable
- ID | Name
- 1 | Fluffeh
- 2 | Bobby
- 3 | Tables
- insert into myTable
- values (1, 'Fluffster');
- insert into myTable
- values (1, 'Fluffster')
- on duplicate key update Name='Fluffster';
- ALTER TABLE myTable
- ADD UNIQUE INDEX (ID, `name`);
- 1. Insert into... on duplicate update
- 2. insert.. ignore
Add Comment
Please, Sign In to add comment