欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

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

程序员文章站 2023-10-20 11:22:37
复制代码 代码如下: string slctpsql="select id ,"+uid+","+ddd+","+score+",'"+mark+"' ,"+markid+...
复制代码 代码如下:

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;