Guest User

Untitled

a guest
Aug 18th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. Insert and if it already exists update the columns SQL
  2. INSERT INTO users (firstname, lastname, email, mobile) VALUES ('Karem', 'Parem', 'mail@mail.com', '123456789');
  3.  
  4. INSERT INTO users(firstname, lastname, email, mobile)
  5. VALUES ('Karem', 'Parem', 'mail@mail.com', '123456789')
  6. ON DUPLICATE KEY UPDATE
  7. firstname = 'Karem',
  8. lastname = 'Parem',
  9. email = 'mail@mail.com', -- you can probably omit this
  10. mobile = '123456789'
Add Comment
Please, Sign In to add comment