Created
          May 23, 2012 12:38 
        
      - 
      
- 
        Save meeDamian/2775046 to your computer and use it in GitHub Desktop. 
    [ Mysql | hacks ] Easy updateing on duplicate
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | -- will work only if theres a key or unique of any kind | |
| INSERT INTO tabela ( name, content ) | |
| VALUES | |
| ('jakasNazwa', 'Jakaś Wartość'), | |
| ('jakasNazwa2', 'Jakaś Wartość 2') | |
| ON DUPLICATE KEY | |
| UPDATE content = VALUES( content ); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment