java.sql.SQLException: Invalid column index

I have seen many beginners asking this question and searching on Google:

I am getting below exception, while running a Java Database Connectivity (JDBC) query. I have checked my query its working fine when I run directly from a SQL client. What could be the reason?
Continue Reading