I'm trying to define a domain which will allow to pass only 6 chars strings. I'm declaring it in a following way:
create domain aircrafts_reg_nos as char(6)
check(length(@value) = 6)
But this doesn't seem to catch strings which are longer than 6 chars. Is there a way to enforce it?