October 26, 2012 at 2:04 pm
hi
my field only accept two values , 01,02 which is numeric
i need to have check constraint ,
my question is it should check (CHECK (Gender IN ('01','02'))
or without quote just 01,02
October 26, 2012 at 2:32 pm
integers,decimals, numerics and floats data types don't have preceding zeros, so no preceeding zero would be correct for those data types.
you said numeric, but are you SURE they are numerics? '01' really implies some varchars involved.
Lowell
October 26, 2012 at 5:25 pm
You should revise the requirements, and understand them better. Because integers cant be preceded by a zero, as the guy above me said...
Otherwise, they should not have ' ' .
October 27, 2012 at 10:35 am
thanks
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply