问题遇到的现象和发生背景
case 3:
System.out.println("请输入要删除的序号(p+数字):");
String num=scanner.next();
statement.executeUpdate("delete from p where PNO="+num+"");
break;
case 3:
System.out.println("请输入要删除的序号(p+数字):");
String num=scanner.next();
statement.executeUpdate("delete from p where PNO="+num+"");
break;
感觉你的报错和代码对不上,你试试把sql改成这个
"delete from p where PNO='"+num+"'"