这两个连接都会给我相同的结果:
SELECT * FROM table JOIN otherTable ON table.ID = otherTable.FK
Run Code Online (Sandbox Code Playgroud)
VS
SELECT * FROM table INNER JOIN otherTable ON table.ID = otherTable.FK
Run Code Online (Sandbox Code Playgroud)
表现或其他方面的陈述是否有任何区别?
不同的SQL实现之间是否有所不同?
我想重现一个查询,其中值是 typeorm 中选择的结果。我想重现的查询是我在此处提供的查询,但我在 typeorm 文档中找不到任何内容。(查询对答案的作用并不重要,我只需要知道如何SELECT在 typeorm 中写出“ ”)
INSERT INTO `furgpezzo`(`giacenza`, `giacenzaMin`, `pezzoBarcode`, `furgoneTarga`, `invStandardId`)
select '0', '5', '234234234234', f.`furgoneTarga`, '1'
from `furgpezzo` f
where f.`invStandardId` = '1'
group by f.`furgoneTarga`
Run Code Online (Sandbox Code Playgroud)
就像是:
(编辑:)
return await this.dmDatabase.getRepository(FurgPezzo)
.createQueryBuilder()
.insert()
.into(FurgPezzo)
.values( //here put my select )
Run Code Online (Sandbox Code Playgroud)