so I wanted to create column let's say master_user, so this master_user column has bit values, 0 and 1. What I wanted to achieve is to make it so that the column master_user has only one '1' value as there are only one master_user. You can have multiple '0' values but not '1'.
In SQL Server, you can do as so:
CREATE UNIQUE NONCLUSTERED INDEX [IX_master_user] ON [user]
(
[master_user] ASC
)
WHERE ([master_user]=(1));
How do I do the same for MySQL ?
Thank you.
UPDATE : MySQL does not support Filtered Index and Conditional Index