I would like to add a BOOLEAN
column to a MySQL table which will be named is_default
. In this column, only one record can have is_default
set to true
.
How can I add this constraint to my column with MySQL?
Thanks!
UPDATE
If it is not a constraint that I should add. How are we dealing with this type of problem on DBs?