它们在语义上共享相同的id,我想在这上面加入表并检索结果。 当然,我可以使用原生查询等,但如果可行,我更喜欢更高级的方法。如果这有意义的话,也许检索连接结果会产生一种新类型的数据类?下面是一个最小的例子,说明我的意思: @Entitydata class Foo( var id: Long,
val fooval这些<em
为什么右外部联接(下面的示例)不像左外部联接那样提供表的完整数据集,因为外部联接总是保留相应表的行?创建表 (id number unique not null, name varchar2(10), department varchar2(10));select * from join_test;
1
假设我有一个有三个列的表: id、title、entity_type,并且取决于entity_type的值,我希望使用子查询从其他表中检索一个值。如果我将我的查询写成:(SELECT status FROM other_table join current_table on other_table.entity_idcurrent_table.id where entity_type = "some_type") a