MySQL删除指定行

来源:互联网 发布:相机透视软件 编辑:程序博客网 时间:2024/05/17 09:06

mysql> select * from tx;
+------+
| id   |
+------+
|    4 |
|    7 |
|    3 |
|    9 |
|    5 |
+------+
5 rows in set (0.05 sec)

mysql
> delete a from tx a inner join (select * from tx limit 2,2) b on a.id=b.id;
Query OK,
2 rows affected (0.11 sec)

mysql
> select * from tx;
+------+
| id   |
+------+
|    4 |
|    7 |
|    5 |
+------+
3 rows in set (0.01 sec)

原创粉丝点击