Hi
Why I got error ?

CREATE TABLE customer_table(
    KNR     INTEGER(10) 
    FN      VARCHAR2(10) NOT NULL,
    EN      VARCHAR2(10) NOT NULL,
    Mobil   NUMBER(10) NOT NULL,
    Tell    INTEGER(10) NOT NULL,


    constraint knr_pk primary key(KNR)

);







Error report -
00907. 00000 -  "missing right parenthesis"
*Cause:    
*Action:

Dani AI

Generated

Short summary and focused troubleshooting (builds on and )

The ORA-00907 message is a generic syntax error: Oracle either found an unmatched parenthesis or “unrecognized information” inside parentheses. A missing comma can definitely trigger it (as suggested), but another very common cause when moving code between engines is using an integer type with a parenthesized size — that is not valid Oracle SQL. (docs.oracle.com)

Why that specific mistake matters here
In Oracle the predefined INTEGER subtype is a constrained form of NUMBER (it is effectively NUMBER(38,0)), so you cannot declare an INTEGER using a precision in parentheses the way MySQL does. If the CREATE used parenthesized sizes on INTEGER columns (a common MySQL habit) the parser will report the “missing right parenthesis” error even after you fix comma placement. (docs.oracle.com)

Practical steps to resolve (in order)

  1. Verify commas and stray trailing commas between column lines and before the closing paren — this is the simplest parse error. (tekstream.com)
  2. Look for any integer columns declared with a parenthesized size. In Oracle either declare the column as plain INTEGER (no parentheses) or use the NUMBER type with an explicit precision if you need to limit digits. (docs.oracle.com)
  3. If the DDL came from MySQL, convert INT(N)/INTEGER(N) usages (MySQL’s “(N)” is a display width) to Oracle-appropriate types — that cross-dialect mismatch is a common source of this error. (dev.mysql.com)

If these checks are done in order the CREATE will usually succeed; if the error persists the parser’s reported line/column (from SQL*Plus or SQL Developer) points exactly to the offending clause for a quick re-check.

Recommended Answers

All 2 Replies

Most likely because you're missing the comma after the primary key KNR.

CREATE TABLE customer_table
(
    KNR INTEGER(10),
    FN VARCHAR2(10) NOT NULL,
    EN VARCHAR2(10) NOT NULL,
    Mobil NUMBER(10) NOT NULL,
    Tell INTEGER(10) NOT NULL,
    constraint knr_pk primary key (KNR)
);

When I add comma or run your code,I still get the same error!!!
As I see the code to create table its not wrong!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.