3)非关键字段部分sql语句生成
update语句,如:update table1 set column1=value1,… where id=100
insert语句,如:insert into table1(id,column1,…)values(100,value1,…)
updateSql="update "+tablename+" set ";
strSql="SELECT column_name,data_type,data_length,data_precision,data_scale
FROM v_dbstru a "+"where table_name=’"+tablename+"’ AND a.column_name
not in (SELECT b.column_name FROM v_pkey_column b
where b.table_name=a.table_name)";rs1=Stmt.executeQuery(strSql);
//取非关键字段字段名和数据类型
while(rs1.next()){
fieldname=rs1.getString("column_name");
Datatype=rs1.getString("data_type");
文章来源于领测软件测试网 https://www.ltesting.net/