select a1,a2 from a,b  where a.a1=b.b1 原始语句大致如上,现在我想在语句做一个判断,如果a1 is null,那么where后面就是a.a1=b.b1;如果a1 is not null,那么where后面就是a2 = b1。
求大神语句如何修改!!!