SQL 如果需要判断bool类型

and (@isViewOthers = 1 or userprofileID = @UserprofileID)

///////////////////////////////////////////////////////////////////

if @isviewother = 1

...

else 

...

原文地址:https://www.cnblogs.com/zqt14520/p/12460636.html