java.sql.SQLSyntaxErrorException:: ORA-00907: missing right parenthesis error

sada
import java.sql.DriverManager;

import java.sql.Connection;

import java.sql.Statement;

public class Create

{

    public static void main( String [] args)throws Exception
    {
        Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1522/orcl1","scott","sada");
        System.out.println("connection is createad");
        Statement stmt=con.createStatement();
        System.out.println("statemnt of object is createad");
        stmt.executeUpdate("create table iteam(iteamno number(3)primarykey,iteamname number(15),price number(4))");
        System.out.println("table is created ");
        con.close();
        stmt.close();
        System.out.println("conncetion closed");
    }
}

Every thing executed successfully but after Statement object it will show this error when my program executes:

java.sql.SQLSyntaxErrorException: ORA-00907: missing right parenthesis Error

hd1

A spacing error. Fixed below; you'd do well to try your statements in a fiddle before posting a question here, @sada:

import java.sql.DriverManager;

import java.sql.Connection;

import java.sql.Statement;

public class Create

{

    public static void main( String [] args)throws Exception
    {
        Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1522/orcl1","scott","sada");
        System.out.println("connection is createad");
        Statement stmt=con.createStatement();
        System.out.println("statemnt of object is createad");
        stmt.executeUpdate("create table iteam(iteamno number(3) primary key,iteamname number(15),price number(4))");
        System.out.println("table is created ");
        con.close();
        stmt.close();
        System.out.println("conncetion closed");
    }
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

SQL Error: Missing Right Parenthesis in Line 1 ORA-00907

From Dev

Error SQL: ORA-00907: "missing right parenthesis"

From Dev

Missing right parenthesis error (ORA-00907: missing right parenthesis)

From Dev

ORA-00907: missing right parenthesis error

From Dev

ORA-00907: Missing right parenthesis in SQL

From Dev

SQL missing right parenthesis ORA-00907

From Dev

SQL Error: ORA-00907: missing right parenthesis - CANNOT FIND ERROR

From Dev

Error at line 1: ORA-00907: missing right parenthesis

From Dev

Lookup Error ORA-00907: missing right parenthesis

From Dev

Error at line 1: ORA-00907: missing right parenthesis

From Dev

Missing Right Parenthesis error in oracle query ORA00907

From Dev

ERROR at line 13: ORA-00907: missing right parenthesis

From Dev

C# Error ORA 00907: Missing Right Parenthesis

From Dev

CREATE TABLE, ORA-00907: missing right parenthesis error

From Dev

ORA-00907: missing right parenthesis oracle sql

From Dev

Oracle SQL error ORA-00907: missing right parenthesis on table create

From Dev

SQL Error: ORA-00907: missing right parenthesis when trying to creating table

From Dev

Strange ORA-00907: missing right parenthesis

From Dev

ORA-00907: missing right parenthesis with PreparedStatement

From Dev

Hibernate : ORA-00907: missing right parenthesis

From Dev

ORA-00907: missing right parenthesis with PreparedStatement

From Dev

ORA-00907: missing right parenthesis?

From Dev

Oracle Apex 5 Error, ORA-00907: missing right parenthesis. Can't see missing parenthesis?

From Dev

PL/SQL procedure to store XML data in a table throws Error(23,102): PL/SQL: ORA-00907: missing right parenthesis

From Dev

ORA-00907 Missing right parenthesis even when parenthesis are balanced

From Dev

What results Oracle "ORA-00907: missing right parenthesis" error on table creation?

From Dev

ORA-00907: missing right parenthesis, on Oracle 10 and not on Oracle 11

From Dev

ORA-00907: Missing Right Parenthesis on a left join of two subqueries

From Dev

ORA-00907: missing right parenthesis i cant find the mistake

Related Related

  1. 1

    SQL Error: Missing Right Parenthesis in Line 1 ORA-00907

  2. 2

    Error SQL: ORA-00907: "missing right parenthesis"

  3. 3

    Missing right parenthesis error (ORA-00907: missing right parenthesis)

  4. 4

    ORA-00907: missing right parenthesis error

  5. 5

    ORA-00907: Missing right parenthesis in SQL

  6. 6

    SQL missing right parenthesis ORA-00907

  7. 7

    SQL Error: ORA-00907: missing right parenthesis - CANNOT FIND ERROR

  8. 8

    Error at line 1: ORA-00907: missing right parenthesis

  9. 9

    Lookup Error ORA-00907: missing right parenthesis

  10. 10

    Error at line 1: ORA-00907: missing right parenthesis

  11. 11

    Missing Right Parenthesis error in oracle query ORA00907

  12. 12

    ERROR at line 13: ORA-00907: missing right parenthesis

  13. 13

    C# Error ORA 00907: Missing Right Parenthesis

  14. 14

    CREATE TABLE, ORA-00907: missing right parenthesis error

  15. 15

    ORA-00907: missing right parenthesis oracle sql

  16. 16

    Oracle SQL error ORA-00907: missing right parenthesis on table create

  17. 17

    SQL Error: ORA-00907: missing right parenthesis when trying to creating table

  18. 18

    Strange ORA-00907: missing right parenthesis

  19. 19

    ORA-00907: missing right parenthesis with PreparedStatement

  20. 20

    Hibernate : ORA-00907: missing right parenthesis

  21. 21

    ORA-00907: missing right parenthesis with PreparedStatement

  22. 22

    ORA-00907: missing right parenthesis?

  23. 23

    Oracle Apex 5 Error, ORA-00907: missing right parenthesis. Can't see missing parenthesis?

  24. 24

    PL/SQL procedure to store XML data in a table throws Error(23,102): PL/SQL: ORA-00907: missing right parenthesis

  25. 25

    ORA-00907 Missing right parenthesis even when parenthesis are balanced

  26. 26

    What results Oracle "ORA-00907: missing right parenthesis" error on table creation?

  27. 27

    ORA-00907: missing right parenthesis, on Oracle 10 and not on Oracle 11

  28. 28

    ORA-00907: Missing Right Parenthesis on a left join of two subqueries

  29. 29

    ORA-00907: missing right parenthesis i cant find the mistake

HotTag

Archive