我是这样解决的:select userName from users where userId > 0 and 别的条件。如果你要通用的,也可以在这样写:select userName from ysers where 1=1 and 条件