I want to check if the values in a column are in the range of 0 to 255, but the column's type is a char, so I'm trying to use a cast, but I get an error.
This is my code:
alter table poste add constraint chk_poste check ( cast(ad as int )ad_int (ad_int is not null) and ad<= 0 and ad>=255);