SQL Error: ORA-00906: missing left parenthesis 00906. 00000 - "missing left parenthesis"
16,962
You're not specifying a constraint name, and I believe that you need to have the check constraint in brackets:
, customer_number NUMBER (11) NOT NULL
constraint custnumlen CHECK (LENGTH(customer_number) = 11))
Take a look at http://www.techonthenet.com/oracle/check.php
Author by
Jatinder Singh
Updated on June 05, 2022Comments
-
Jatinder Singh almost 2 years
CREATE TABLE customer(customer_id NUMBER(6) PRIMARY KEY , customer_name VARCHAR2(40) NOT NULL , customer_address VARCHAR2(60) NOT NULL , customer_email VARCHAR2(35) , customer_number NUMBER (11) NOT NULL CHECK LENGTH(customer_number) = 11)
This is just taking the mick I don't understand what is wrong