What does the following Oracle error mean: invalid column index

2022-09-01 01:54:10

I got the following error while testing some code:

SQLException: Invalid column index

What exactly does that mean?

Is there an online document explaining what all the Oracle error codes and statements?


答案 1

If that's a SQLException thrown by Java, it's most likely because you are trying to get or set a value from a ResultSet, but the index you are using isn't within the range.

For example, you might be trying to get the column at index 3 from the result set, but you only have two columns being returned from the SQL query.


答案 2

It sounds like you're trying to a column that doesn't exist. SELECT

Perhaps you're trying to a column that doesn't exist?ORDER BY

Any typos in your SQL statement?


推荐