I have an table employees , and I want to add an constraint which makes me able to have ONLY one employee with id_manager null.. I have a sample from my code , but I think it's wrong..
ALTER TABLE employees ADD CONSTRAINT u_t UNIQUE (id_manager);
And this is the error I get.
SQL Error: ORA-02299: (OPREAC_IDD.U_T)
02299. 00000 - "cannot validate (%s.%s) - duplicate keys found"
*Cause: an alter table validating constraint failed because the table has
duplicate key values.