我不确定首先使用哪种SQL方言是否可能通过
INSERT .. VALUES,但是您当然可以使用
INSERT .. SELECt以下方式表达这种查询:
INSERT INTO a (a, b, x, y, z)SELECT a, b, ... other value ..., ... other value ..., ... other value ...FROM bWHERe ...RETURNING *;
或与jOOQ
context.insertInto(TABLE A, ... columns ...) .select(select( FIELD A, FIELD B, ... other field of table A ..., ... other field of table A ..., ... other field of table A ...) .from(B) .where(...)) ) .returning() .fetch()



