SQL 语句判断记录是否存在(最简洁简单性能最优)
2021-02-02 本文已影响0人
QianmianH
原作者禁止转载,这里放个链接吧:
https://www.cnblogs.com/xunziji/p/6343891.html
最优解:
select isnull((select top(1) 1 from tableName where conditions), 0)
原作者禁止转载,这里放个链接吧:
https://www.cnblogs.com/xunziji/p/6343891.html
最优解:
select isnull((select top(1) 1 from tableName where conditions), 0)