String sql="select ID as \"Batch ID\", NAME as \"Batch Name\",START_DATE as \"Start date\",END_DATE as \"End date\"FROM BATCH order by NAME;";
try {
pst = con.prepareStatement(sql);
rs = pst.executeQuery();
jTable1.setModel(DbUtils.resultSetToTableModel(rs));
}
catch(Exception e) {
JOptionPane.showMessageDialog(null, e);
}
此代码返回错误
java.sql.SQLException:ORA-00911:无效字符
我也尝试\
从查询中删除并替换为'
. 但这对我不起作用