首页 > 数据库 > SQL Server > 正文

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

2020-07-25 12:58:45
字体:
来源:转载
供稿:网友
复制代码 代码如下:

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;
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表