Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Using BETWEEN '0' AND '9' in table constraint
I am trying to limit data entry into a CHAR 9 social security number column to integers. We have not used a NUMBER field since users search on partial social security numbers.
Here is a test table and the error message:
imgntsvr1dosp> CREATE TABLE SPROJ_TRESEARCHERS 2 (
3 RESEARCHER_SSN CHAR(9) NOT NULL 4 CONSTRAINT CKC_RESEARCHER_SSN CHECK (BETWEEN '0' AND '9')5 )
CONSTRAINT CKC_RESEARCHER_SSN CHECK (BETWEEN '0' AND '9') *ERROR at line 4:
Thanks very much for your time and help.
Steven Moyano
Northwestern University, Evanston, IL. USA
Steven Moyano <smoyano_at_NWU.EDU>
Received on Fri Jun 05 1998 - 09:00:45 CDT