|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
ORA-00922: missing or invalid option
hi all ...
here is a new problem for u to solve... am trying to add this table to the data base but it gives me the following error ERROR at line 2: ORA-00922: missing or invalid option this is the table ... CREATE TABLE BILL ( BILL_NO NUMBER NOT NULL, GUEST_NUMBER NUMBER(5), ROOM_NO NUMBER(3), BILL_DATE DATE NOT NULL, RATE NUMBER(7)NOT NULL, TELEPHONE_BILL NUMBER(7)NOT NULL, RESTURANT_BILL NUMBER(7) NUT NULL, SERVIES_BILL NUMBER(7)NOT NULL, CONSTRAINT BILLS_GUEST_NUMBER_FK FOREIGN KEY (GUEST_NUMBER) REFERENCES CUSTOMERS_INFO (GUEST_NUMBER), CONSTRAINT BILL_ROOM_NO_FK FOREIGN KEY (ROOM_NO) REFERENCES ROOM_NO(ROOM_NO) ); can u help me with it plZ ... thanks and regards ... |
|
#2
|
|||
|
|||
|
The error is in line 9:
RESTURANT_BILL NUMBER(7) NUT NULL, should be RESTURANT_BILL NUMBER(7) NOT NULL, instead. |
|
#3
|
|||
|
|||
|
thanks a million for ur help ...it was such a silly mistake which i always fall into ....
it works now ...regards |
|
#4
|
|||
|
|||
|
somebody please help me with this problem where is the
erorr(I can't find it )please reply me 1 create table articol( 2 cod_a varchar2(3),nume_a varchar2(15),pret_a number(7) 3 durata number(4) constraint 4 durata_ck check(cod_a in substring (cod_a,1,1)=(c,b,a) and durata=0) 5 or check(cod_a in 's%' substring(cod_a,1,1) and durata<3) 6 or check(cod_a in 'p%' substring(cod_a,1,1) and durata>9 and pret_a>15000) 7* ) SQL> / create table articol( * ERROR at line 1: ORA-00922: missing or invalid option |
|
#5
|
|||
|
|||
|
Lot's of errors in your statement. Perhaps the following is what you want:
Code:
CREATE TABLE articol(
cod_a VARCHAR2(3) NOT NULL,
nume_a VARCHAR2(15),
pret_a NUMBER(7),
durata NUMBER(4),
CONSTRAINT durata_ck CHECK
(
(substr(cod_a,1,1) in ('c','b','a') and durata=0) or
(substr(cod_a,1,1)='s' and durata<3) or
(substr(cod_a,1,1)='p' and durata>9 and pret_a>15000)
)
)
/
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > General SQL Development > ORA-00922: missing or invalid option |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|