Referring to this oracle website http://docs.oracle.com/javadb/10.4.2.1/ref/rrefblob.html, I tried executing this query (from the abovementioned page)
create table pictures(name varchar(32) not null primary key, pic blob(16M));
I am getting the error
Error starting at line : 1 in command -
create table pictures(name varchar(32) not null primary key, pic blob(16M))
Error report -
SQL Error: ORA-00907: missing right parenthesis
00907. 00000 - "missing right parenthesis"
*Cause:
*Action:
I am unable to understand where exactly there is a missing parenthesis.
Can anyone explain?
There is no need to specify the size for the blob. Thats why you are getting an error for the missing parenthesis.
This statement would work.
create table pictures(name varchar(32) not null primary key, pic blob);
The oracle doc explains everything clearly.
Related
Please help to resolve the CREATE table issue,
Missing right parenthesis bug when adding invisible statement, please check the below code and advise me.
create table can_table(
canno number(6,0) invisible generated by default as identity
,canname nvarchar2(20)
);
Result
Error starting at line : 34 in command -
create table can_table(
canno number(6,0) invisible generated by default as identity
,canname nvarchar2(20))
Error report -
ORA-00907: missing right parenthesis
00907. 00000 - "missing right parenthesis"
*Cause:
*Action:
This works fine in livesql
create table can_table(
canno number(6,0) invisible generated by default as identity
,canname nvarchar2(20)
);
INSERT into can_table values ('XXX');
SELECT * from can_table;
CANNAME
XXX
SELECT canno, canname from can_table;
CANNO CANNAME
1 XXX
While doing an import in an oracle 10G database using imp, I receive following error:
IMP-00017: following statement failed with ORACLE error 604:
CREATE TABLE DASHBOARD_ADMINISTRATOR
(ID NUMBER(19, 0) NOT NULL ENABLE,
USER_NAME VARCHAR2(20) NOT NULL ENABLE,
NAME VARCHAR2(50), FIRST_NAME VARCHAR2(50));
IMP-00003: ORACLE error 604 encountered
ORA-00604: error occurred at recursive SQL level 1
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 22
When doing the same thing in TOAD, I have the same error even if I only try to create the table with only 1 column specificied, which is even more strange since I only have 2 lines...
Creating a table called DASHBOARD_ADMINISTRATO is possible, DASHBOARD_ADMINISTRATORR gives again the same error.
However, when I switch places of the words in the name, it works fine.
There is no limit set on tablename length because several of the imported tables have more characters.
I used the same dumpfile to import into oracle 11G and there it was successful.
Any ideas, someone?
Thx for your help.
"character string buffer too small" - Mayby try to increase Varchar Tables. And change number(19,0) to number(19) - ID's is just an integer, they don't have coma, period. In importing/exporting various scenarios came out :)
I have a table named "airplane" with "Serial_no", "aircraft_model" and "capacity". I want to insert data into the table but I keep getting the error message
INSERT INTO "T55878"."AIRPLANE" (SERIAL_NO, AIRCRAFT_MODEL, CAPACITY)
VALUES ('22768', 'KBH001', '970')
ORA-30667: cannot drop NOT NULL constraint on a DEFAULT ON NULL column
ORA-06512: at line 1
I read on various forums that purging your recycle bin can be the answer however when I type in purge recyclebin; and run the statement, I only get this:
Can anyone help me understand what the issue is and how I can fix it. Thank you.
While I am creating a table In MySql, I am getting an error. I don't know What the problem is, but it will be helpful if I understand the reason behinId it.
Query:
create table publish(
From varcahar(60),
To varchar(60)
);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'From varcahar(60),To varchar(60))' at line 1
Several errors:
1.- From and To are reserverd words you need to escape them
2.- varcahr -> varchar
Final code:
create table publish(
`From` varchar(60),
`To` varchar(60)
);
It says varcahr(60) not varchar(60)
Spelling problem
create table publish(From varchar(60),To varchar(60));
This is the right one. You misspelled varchar
And also From and To are reserved words. Check this Reserved Words In MySql
I'm getting an
ORA-00907 error, missing right parenthesis
when attempting to create a table w MySQL.
I have looked extensively on the web but found nothing that could help me here..
Here is my CREATE TABLE statement:
CREATE TABLE station
(
nomStation varchar2(255),
capacite number(15) NOT NULL,
lieu varchar2(255) NOT NULL,
region ENUM('Quebec', 'Ontario', 'NewBrunswick', 'NovaScotia'),
tarif number(10) DEFAULT 0,
CONSTRAINT station_nomStation_pk PRIMARY KEY(nomStation)
);
In my experience, "ORA-00907 error, missing right parenthesis" is usually triggered by a wrong number of commas, like adding an extra comma after your final column or constraint.
However, in your case some googling seems to indicate that Oracle doesn't support the ENUM syntax you're using. Instead, you should use a CHECK, like described in this blog post.