|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
ora-00922; MISSING OR INVALID OPTION ERROR
Hi,
I want to create a table with the following code on oracle 9i. I am getting the error ORA-00922; missing or invalid option. I guess something is wrong with the code. Could anypne help me on this. thanks in adv create table Emp_performance ( perform_empno number(10), assess_year date, organization_id varchar2(20), existing_level varchar2(20), present_pot varchar2(20), max_pot_fut_level varchar2(20), people_lead_pot varchar2(10), team_lead varchar2(100), constraint pkempperformance primary key(assess_year,perform_empno), constraint fkempperformance foriegn key perform_empno references team_mem_info(emp_no) on delete cascade ); |
|
#2
|
|||
|
|||
|
Do you need a comma between your foreign key declaration and the on delete?
|
|
#3
|
|||
|
|||
|
Quote:
No, That doesn't work either |
|
#4
|
|||
|
|||
|
oh, it was the spelling of foreign!
|
|
#5
|
|||
|
|||
|
there are two errors
Hi, I have tried your code on Oracle 9i and found there are two errors in it: 1. The word “foriegn” is a wrong spelling word. 2. You should add parenthesis() for foreign key perform_empno as below constraint fkempperformance foreign key(perform_empno) references team_mem_info(emp_no) on delete cascade ); The result is shown as below: SQL> @create_emp_performance.sql; Table created. SQL> desc Emp_performance; Name Null? Type ----------------------------------------- -------- ---------------------------- PERFORM_EMPNO NOT NULL NUMBER(10) ASSESS_YEAR NOT NULL DATE ORGANIZATION_ID VARCHAR2(20) EXISTING_LEVEL VARCHAR2(20) PRESENT_POT VARCHAR2(20) MAX_POT_FUT_LEVEL VARCHAR2(20) PEOPLE_LEAD_POT VARCHAR2(10) TEAM_LEAD VARCHAR2(100) You could try it again! Good luck! Jean Wang |
|
#6
|
|||
|
|||
|
ORA - 0922 while using Dynamic SQL's
Hi All,
The below mentioned query gives ora 0922 error.. l_select_query1 :='create table temp001 no logging as select distinct return_line_id from cor_return_line@rcomdb'; l_select_query2 :='union all select distinct return_line_id from cor_return_line_tax_record@rcomdb'; execute immediate(l_select_query1||' '||l_select_query2); But if I remove No Logging it works fine.Pls help |
|
#7
|
|||
|
|||
|
ORA-00922: missing or invalid option
Hi,
I want to create a table with the following code on oracle 3.3. I am getting the error ORA-00922; missing or invalid option. I guess something is wrong with the code. Could anyone help me on this. thanks in adv SQL> CREATE TABLE Usuario 2 (Id_usuario VARCHAR2(30), 3 Nom_usuario VARCHAR2(50) NOT NULL, 4 Id_departamento NUMBER NOT NULL, 5 Id_grupo NUMBER NOT NULL, 6 Estado VARCHAR2(1) DEAFAULT 'A' NOT NULL 7 CONSTRAINT ck_Estado_Usuario 8 check (Estado in('A','I')), 9 CONSTRAINT pk_Usuario PRIMARY KEY (Id_usuario), 10 CONSTRAINT fk1_usuario FOREIGN KEY (Id_departamento) 11 REFERENCES Departamento (Id_departamento), 12 CONSTRAINT fk2_Usuario FOREIGN KEY (Id_grupo) 13 REFERENCES Grupo_usuario (Id_grupo))); (Id_usuario VARCHAR2(30), * ERROR at line 2: ORA-00922: missing or invalid option |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Database Development > ora-00922; MISSING OR INVALID OPTION ERROR |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|