在sql sqlserver存储过程中,如果用来判断该记录是否存在时。如果用if exitst(select * from table )如果记录多的话会影响查询速度,可以转换为 if exitst(select count(1) from table)这样的话当查询只要有一条符合就行。
在sql sqlserver存储过程中,如果用来判断该记录是否存在时。如果用if exitst(select * from table )如果记录多的话会影响查询速度,可以转换为 if exitst(select count(1) from table)这样的话当查询只要有一条符合就行。