我尝试创建一个 PreparedStatement:
stmt = conn.prepareStatement("SELECT POLBRP, POLTYP, POLNOP, INCPTP, TRMTHP, " +
"CLTKYP , CANDTP, POLSTP, EXPRYP, OINCPP, CANRNP, PAYMDP,
KCNFLP, KCRTSP, KACADP, KSCHMP, EXPRYP FROM "
+ POLHDR + " WHERE POLNOP = " + idNumber +
" AND POLBRP = " + branch + " AND POLTYP = " + product +
" AND OINCPP <= "+date );
这会引发 SQLException: [SQL0206] Column AD not in specified tables。
我不知道它从哪里获取 AD 列,因为我从未在 select 子句中指定它(除非我完全盲目和愚蠢)
任何人都可以帮忙吗?