sql 语句插入结果为select和值混合示例

时间:2021-12-18 00:29:09
  1. String slctpsql="select id ,"+uid+","+ddd+","+score+",'"+mark+"' ,"+markid+" ,"+exam.getId()+" from Test_Paper where testBaseId=(select id from Test_Base where baseTestId="+judgemap.get(i).getId()+" and baseTestType=1) and paperId="+paperbaseinfo.getId();  
  2.  
  3. String insertsql="insert into Test_Paper_Record (t_pid,userId,answer,score,mark,markerId,examid )"+slctpsql;