我想做一个这样的查询:
SELECT * FROM my_table where column_one <= column_two;
使用 QueryBuilder 我可以制作where().le(column_one, Object obj)
,但我想要一些类似的东西where().le(column_one, column_two)
;
实际上,我想要以下查询:
SELECT * FROM table_one INNER JOIN table_two ON table_one.column_foreign_id = table_two.id WHERE table_two.column_one <= table_two.column_two。
什么是最好的方法?
感谢您的时间。