What's the best to check if item exist or not: Select Count(ID)OR Exist(…)?

后端 未结 2 1220
Happy的楠姐
Happy的楠姐 2020-11-27 20:03

What\'s the best in performance to determined if an item exist or not specially if the table contain more than 700,000 row

if (Select count(id) from Regist         


        
2条回答
  •  天命终不由人
    2020-11-27 20:54

    also take in consideration that Count() only return int in which if you count some data that exceed int it will generate error

提交回复
热议问题