Skip to main content
edited tags
Link
user330315
user330315
Added Oracle flag
Link
e_i_pi
  • 4.9k
  • 5
  • 32
  • 47
Source Link

Check constraint not reading [A-Z]?

I am having an issue with a check constraint reading [A-Z].

here is the code:

drop table test CASCADE CONSTRAINTS; Create table test ( post Varchar2(6), CHECK (post like '[A-Z]') ); insert into test values ('A'); 

And I receive a "check constraint violated" error after trying to insert A. Any feedback would be appreciated. Even if it does work for you because everything is telling me it should work.