-4

I am trying to insert data into database but I am getting this exception:

java.sql.SqlException:[Oracle][ODBC]ORA-00928:missing SELECT keyword

p.campbell
  • 98,673
  • 67
  • 256
  • 322
Deepa
  • 27
  • 1
  • 1
  • 2

1 Answers1

5

It sounds like you're trying to insert data into an Oracle table. Try formulating a statement like this:

 INSERT INTO MyTable(Column1, Column2)
 VALUES (1, 'SomeString');

or

INSERT INTO MyTable(Column1, Column2)
     SELECT Foo, Bar
     From MySecondTable;
p.campbell
  • 98,673
  • 67
  • 256
  • 322