简体   繁体   English

SQLite中的左外部联接

[英]Left Outer Join in SQLite

I have two tables, the first having more rows than the second. 我有两个表,第一个表比第二个表有更多的行。

I am trying to use a LEFT OUTER JOIN to put these two tables together in SQLite but I keep getting an error message. 我正在尝试使用LEFT OUTER JOIN在SQLite中将这两个表放在一起,但我一直收到错误消息。

The query I am running is: 我正在运行的查询是:

SELECT a.object, a.id, b.objectName 
FROM tableOne a 
LEFT OUTER JOIN tableTwo b ON a.id=b.id 

The error message I get is: 我收到的错误消息是:

Exception Name: NS_ERROR_FAILURE
Exception Message: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageConnection.createStatement]

Isolate table names: 隔离表名称:

SELECT a.object, 
       a.id, 
       b.objectName 
  FROM "tableOne" a 
       LEFT OUTER JOIN "tableTwo" b 
            ON a.id=b.id

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM