---
title: "mysql delete where in 的恶心问题"
author: "hipeace87"
date: "2009-12-28T14:45:10Z"
tags: []
categories: ["数据库"]
slug: "mysql-delete-where-in"
draft: false
lastmod: "2009-12-28T14:45:10Z"
id: 558312
url: "https://hipeace87.iteye.com/blog/558312"
---

```
delete from `t_goods` where fi_id in (select * from ( select fi_id from `t_goods` where fs_num is null and fs_name is null and fs_type is null and
fs_using is null and fs_lifetime is null) b)
```

 

```
delete from `t_goods` where fi_id in (select fi_id from `t_goods` where fs_num is null and fs_name is null and fs_type is null and
fs_using is null and fs_lifetime is null) 
```

 

```
delete from `t_goods` where fi_id in ( select fi_id from `t_goods` ) 
```

 上面三种情况，只有中间的不能执行。

综合起来就是mysql delete from where in 时后面 的查询语句里不能加where条件