数据库插入问题!!
String sql1= "INSERT INTO guest(name,Snum,age,addr,intime,outtime) VALUES( ' "+str1+ " ', "+str2+ ", "+str3+ ", ' "+str5+ " ', "+str6+ ", "+str7+ ") ";
String sql2= "UPDATE room set flag=1 where room.roomnum= "+str4;
为什么我在执行的时候它会说我对guest重复插入呢??请高手指点!!
------解决方案--------------------重复插入拉~~~guest这张表的主键是社么,主键变化下就能插入了