SQL 如果需要判断bool类型

 

 

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

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

if @isviewother = 1

else