Unique columns
Posted: Tue Oct 04, 2005 7:59 am
Quick question regarding 'unique' in mysql.
By Declaring a column unique, does this translate to mean that no given data can ever be duplicated even if that data is removed.
The reason I ask is because I was looking to mysql to make sure an email column was never duplicated (laziness on my part). However after a couple hours of error messages, I have come to the previous tentative conclusion.
if I enter 'noname@hello.com' into an column labeled unique. I later decide to delete this row and enter the name again. Given that the column is unique, should this work or not. If not Guess will have to do a manual verification.
Thx.
By Declaring a column unique, does this translate to mean that no given data can ever be duplicated even if that data is removed.
The reason I ask is because I was looking to mysql to make sure an email column was never duplicated (laziness on my part). However after a couple hours of error messages, I have come to the previous tentative conclusion.
if I enter 'noname@hello.com' into an column labeled unique. I later decide to delete this row and enter the name again. Given that the column is unique, should this work or not. If not Guess will have to do a manual verification.
Thx.