sup*_*erM 1 exists count sql-server-2008
我有一个表,想要检查是否存在满足某些简单条件的记录.我想知道哪个会更快:
if (select count(*) from ... where ...) > 0
要么
if exists (select top (1) from ... where ...) .
| 归档时间: |
|
| 查看次数: |
1025 次 |
| 最近记录: |