假设现在要删除的ID为1~100,那么我的sql怎么写比较好1、delete from XXX where id in(1,2,3,.....100)2、 发100条delete语句delete from xxx where id = 1;
delete from xxx where id = 2;
delete from xxx where id = 3;
......delete from xxx where id = 100;
delete from xxx where id = 2;
delete from xxx where id = 3;
......delete from xxx where id = 100;
解决方案 »
- 正则表达式如何控制两个组合起里的长度
- 一个关于EL取值问题
- 怎样使异常不在控制台输出
- myeclipse7.1插件安装问题
- 请问 hibernate 中配置文件list自动产生的表怎么与另一张表产生一对一的关系
- enctype="multipart/form-data"的问题
- struts中的乱码问题
- jsf的h:dataTable怎么修改每行的字体,背景色等属性?
- 用过Soket请进.
- springMVC拦截器配置一个不拦截的url,使用localhost:8080就可以直接访问,换成127.0.0.1:8080就会被拦截,这是怎么回事啊
- JDBC问题
- 急急急!!!为什么网络连接正常的情况下,访问本地项目(http://localhost:8080/project)速度很慢!而拔掉网线断开网络的话,速度很快呢?
不用管是否连续吧,直接 delete from xxx where id >= 1 and id <= 100;
这样只要id在1~100之间的都删除了啊