KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
My SQL schema is CREATE TABLE Foo ( `bar` INT NULL , `name` VARCHAR (59) NOT NULL , UNIQUE ( `name`, `bar` ) ) ENGINE = INNODB; MySQL is allowing the following statement to be repeated, resulting in duplicates. INSERT INTO Foo (`bar`, `name`) VALUES (NULL, 'abc'); despite having UNIQUE ( `name`, `bar` ) Why is this tolerated and how do I stop it?
Tags (comma-separated)
Save Edits
Cancel