sql insert into 多条数据

来源:百度知道 编辑:UC知道 时间:2024/05/16 00:43:17
表名 table
字段有3个
id ,name,age
我现在要插入数据,id=1 name=hh age=20
2
3
id是不确定的数组,请问,要怎么写sql语句啊?
很急,在线等,谢谢了!!!
name,age输入的数据可以是一样的!!!

给你点提示
多个名字一样的 cheackbox 得值是用
String[] ZB_BP_IDS = req.getParameterValues("showZB_BP_ID"); 方法得

String[] id = req.getParameterValues("idname");
for(int i = 0;i < id.length;i++){
sql = "insert into table values(" + id[i] + ",'hh','20')";
}

?不是太明白
应该是
insert table(id,name,age) values('1','hh','20')
是这样吧?