Unanswered: To define data types with Check Constraints
I m trying to define specific data types with Check Constraints. I want to define a column so that only be able to enter a code consisting in eight numbers and one letter in capital, for instance: 25814712X. I ve obtained successfully result except the letter that accept small letters, and I only want to accept capitals (Ρ character included). The syntax is as follows:
ALTER TABLE Users
ADD CONSTRAINT CK_code
CHECK (User_code LIKE '[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][A-Z]')
How can I write it so that only be able to accept letters in capitals? (Ρ character included)
How can I write a Check Constraint that only allows a characters set which contains the character @ between that, and finishes with .com, .net, .uk, .fr, .org, etc,..? I want user only be able to write the correct e-mail format.