Quantcast
Channel: Toad for MySQL
Viewing all articles
Browse latest Browse all 1315

Forum Post: RE: Importing CSV files ignores unique index

$
0
0
I advise you to read this dev.mysql.com/.../sql-mode.html By default MySQL, even with InnoDB, won't throw an error when you try to insert NULL into a NOt NULL field unless you change the sql mode before. As for the unique index, that sounds strange... but keep in mind that unlike Oracle, MySQL throws an error when you try to insert ('hello', 'world') twice in a 2 field unique key, but it will let you insert ('hello',NULL) twice since NULL is considered undefined, so NULL = NULL evaluate to false and so the unique index won't be violated.... in this MySQL is much more logical and standard than Oracle!

Viewing all articles
Browse latest Browse all 1315

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>