Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error

 
Red Rose
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hi Team,


While executing above program i am getting following error, kindly help me to clear that error

java.sql.SQLException: [Oracle][ODBC][Ora]ORA-00907: missing right parenthesis
java.sql.SQLException: [Oracle][ODBC][Ora]ORA-00907: missing right parenthesis
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6956)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7113)
at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3109)
at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:337)
at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:252)
at database.CreateTable.main(CreateTable.java:23)
BUILD SUCCESSFUL (total time: 0 seconds)
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

First of all, do not use ODBC. Use Oracle's JDBC driver, it performs better and is more supported.

Anyway, your error has nothing to do with Java. Try running the statement in SQL*Plus or something similar, you'll get the same error message. The problem is that the INT type in Oracle is a synonym for NUMBER(38) and cannot take any precision. You probably wanted to use NUMBER(20) instead.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic