l******9 发帖数: 579 | 1 I need to do a sql query in MS Access 2012.
But I got error in MS Access:
SELECT *
FROM
(
SELECT *
FROM table1
where not exists
(
SELECT *
FROM table2
where table2.id = table1.id
) as t
) as t1, table3
where table3.id = t1.id
Syntax error: (missing operator) in query expression 'not exists ( ... ) as
t'
Any help would be appreciated. | c*****o 发帖数: 1702 | 2 table1的where clause的column name没有 | d*********0 发帖数: 12 | 3 table1 和 table2 的schema必须一致, 如果用*, 两表结构可能(column)不一致,出错. | c*****d 发帖数: 6045 | 4 -- not exists的subquery不要alias
SELECT *
FROM
(
SELECT *
FROM table1
where not exists
(
SELECT *
FROM table2
where table2.id = table1.id
)
) as t1, table3
where table3.id = t1.id |
|