Man*_*ngh 4 ms-access ms-access-2007
我正在用内连接编写SQL查询
select * from (table1 inner join table2 on table1.city = table2.code)
inner join table3 on table3.col1 = 5 and table3.col2 = 'Hello'
Run Code Online (Sandbox Code Playgroud)
这给了我错误"不支持连接表达式".
但是,如果我像这样更改查询,则没有错误
select * from (table1 inner join table2 on table1.city = table2.code)
inner join table3 on table3.col1 = [SomeColumn] and table3.col2 = [SomeColumn]
Run Code Online (Sandbox Code Playgroud)
为什么Access会在第一个查询中给出错误?
为什么 Access 在第一个查询时给出错误?
好吧,就像错误消息所说的那样,不支持这种形式的 JOIN 表达式。
您可能想尝试以下操作:
SELECT * FROM table1, table2, table3
WHERE table1.city=table2.code AND table3.col1=5 AND table3.col2='Hello'
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
24505 次 |
最近记录: |