范例如下:
SqlExpressionGroup g1 = Cnd.exps("1", "=", 1); SqlExpressionGroup g2 = Cnd.exps("2", "=", 2); SqlExpressionGroup g3 = Cnd.exps("3", "=", 3); SqlExpressionGroup g4 = Cnd.exps("4", "=", 4); SqlExpressionGroup g5 = Cnd.exps("5", "=", 5); SqlExpressionGroup g6 = Cnd.exps("6", "=", 6); Cnd.where(g1).and(g2).and(g3.and(g4).or(g5).and(g6));
呵呵,主要是括号的使用~~
出来sql就类似于: where 1=1 and 2=2 and (3=3 and 4=4 or 5=5 and 6=6)
|