krot

UNIQUE INDEX

Aug 9th, 2016
87
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE UNIQUE INDEX index_name
  2.     ON TABLE_NAME ( поля через запятую)
  3.  
  4. CREATE TABLE IF NOT EXISTS `NEW` (
  5.   `ID` INT(11) NOT NULL AUTO_INCREMENT,
  6.   PRIMARY KEY (`ID`),
  7.   UNIQUE KEY `UKEY` (`ID_A`,`ID_N`,`ID_B`,`ID_S`)
  8. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=514240 ;
RAW Paste Data