【发布时间】:2015-01-25 05:06:55
【问题描述】:
如果其中一行满足条件,如何排除多行?
<table>
<th>Instruction_ID</th>
<th>Instruction_Desc</th>
<tr>
<td>1</td>
<td>Please use these products:</td>
</tr>
<tr>
<td>1</td>
<td>Kerlix</td>
</tr>
<tr>
<td>1</td>
<td>Sodium Chloride</td>
</tr>
<tr>
<td>1</td>
<td>Tegaderm</td>
</tr>
<tr>
<td>2</td>
<td>Please use these products</td>
</tr>
<tr>
<td>2</td>
<td>Sodium Chloride</td>
</tr>
</table>
如果组中的一行包含“Kerlix”一词,我将尝试排除给定指令 ID 的所有行。期望的输出是:
<table>
<th>Instruction_ID</th>
<th>Instruction_Desc</th>
<tr>
<td>2</td>
<td>Please use these products</td>
</tr>
<tr>
<td>2</td>
<td>Sodium Chloride</td>
</tr>
</table>
【问题讨论】:
-
你为什么一直编辑你的问题?您有 2 个已发布的解决方案都可以使用。
标签: sql multiple-records