如果表格包含超过700,000行,则确定项目是否存在的性能最佳
if (Select count(id) from Registeration where email='email@w.cn') > 0
print 'Exist'
else
print 'Not Exist'
Run Code Online (Sandbox Code Playgroud)
要么
if Exists(Select id from Registeration where email='email@w.cn')
print 'Exist'
else
print 'Not Exist'
Run Code Online (Sandbox Code Playgroud)