Skip to content Skip to sidebar Skip to footer

Oracle Invalid Identifier Doesnt Understand String

I'm having an issue with my query not working. This is the command variable. When it executes it should be retrieving the tuples that have BSc as their degree. I have tested this i

Solution 1:

In JDBC your SQL statement should not be terminated by semicolon.

Change

String command = "SELECT distinct fname, lname, student_id FROM student"+
       " where degree='"+ degree + "';";

to

String command = "SELECT distinct fname, lname, student_id FROM student"+
       " where degree='"+ degree + "'";

Post a Comment for "Oracle Invalid Identifier Doesnt Understand String"