当前位置 : 主页 > 数据库 > mssql >

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

来源:互联网 收集:自由互联 发布时间:2021-04-05
复制代码 代码如下: 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 baseTestTy
复制代码 代码如下:
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();

String insertsql="insert into Test_Paper_Record (t_pid,userId,answer,score,mark,markerId,examid )"+slctpsql;
网友评论