Guest User

Untitled

a guest
Jan 20th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. MyTable
  2. ID | Name
  3. 1 | Fluffeh
  4. 2 | Bobby
  5. 3 | Tables
  6.  
  7. insert into myTable
  8. values (1, 'Fluffster');
  9.  
  10. insert into myTable
  11. values (1, 'Fluffster')
  12. on duplicate key update Name='Fluffster';
  13.  
  14. ALTER TABLE myTable
  15. ADD UNIQUE INDEX (ID, `name`);
  16.  
  17. 1. Insert into... on duplicate update
  18. 2. insert.. ignore
Add Comment
Please, Sign In to add comment