I want to add a check constraint to this table I'm working with... well, a few constraints, actually.
I generally want to check the length of string values. I'm... pretty n00bish at writing T-SQL and I strictly speaking know how to write a constraint, I just... don't know how to do it in practice yet.
A little...tiny bit of help... Please, thank you.
I think it ought to look something like this:
Code:
ALTER TABLE tblUsers
ADD CONSTRAINT ckLength
CHECK (Len(Username) < 6)
Does that look right, or... am I just thinking too hard here?