GORM 'NOT IN' 子查询
GORM 'NOT IN' subquery
我想执行这样的子查询:
SELECT id, col1, col2 FROM table1 WHERE col1='val1' and col2 NOT IN (
SELECT ID FROM table2 WHERE col1='val1' and col3 = 'val3')
如何使用GORM来执行它?
我想执行这样的子查询:
SELECT id, col1, col2 FROM table1 WHERE col1='val1' and col2 NOT IN (
SELECT ID FROM table2 WHERE col1='val1' and col3 = 'val3')
如何使用GORM来执行它?