I am trying to run multi-statement queries using JDBC on DB2 10.1 Windows but it fails with a syntax error. Following is the query-
SELECT * FROM schemaname.tablename;
Exception in thread "main" com.ibm.db2.jcc.am.SqlSyntaxErrorException: An unexpected token "" was found following "". Expected tokens may include: "schemaname.tablename".. SQLCODE=-104, SQLSTATE=42601, DRIVER=4.13.127
I understand that this comes due to the semi-colon at the end of the query which is not understand by the database. How can I set the query separator as semicolon so get through this.