SELECT * FROM sometable where a=1 and (a=2 or (b=1 and c=2))
如何构建我需要的查询? (没有内联查询)
答案 0 :(得分:1)
DB.Select().From(sometable.Schema)
.Where(sometable.a).IsEqualTo(1)
.AndExpression(sometable.a).IsEqualTo(2)
.OrExpression(sometable.b).IsEqualTo(1)
.And(sometable.c).IsEqualTo(2);