Delphi Can
About Access SQL - Baskı Önizleme

+- Delphi Can (https://www.delphican.com)
+-- Forum: Veri Tabanı (https://www.delphican.com/forumdisplay.php?fid=4)
+--- Forum: MySQL (https://www.delphican.com/forumdisplay.php?fid=14)
+--- Konu Başlığı: About Access SQL (/showthread.php?tid=5669)



About Access SQL - johnnwicky - 22-01-2021

Im Learning SQL Certification training, I would like to ask an Access SQL question.
There is a code like the following, but I would like to add a comparison with a fixed value as an or condition.
I'm new to SQL and it doesn't work.
I would appreciate it if you could teach me.
SELECT A FROM TableA LEFT OUTER JOIN TableB
ON Table A. Column A = Table B. Column B
WHERE Column B IS NULL
↓
SELECT A FROM TableA LEFT OUTER JOIN TableB
ON Table A. Column A = Table B. Column B
OR Table A. Column A = Fixed value
WHERE Column B IS NULL


  • [url=https://www.c-sharpcorner.com/forums/about-access-sql/suggestions][/url]



About Access SQL - mrmarman - 22-01-2021

There are different syntax depends database backends.

If you are writing a query for Access database, you need to use the following join syntax with paranthesis:

Kod:
select
 table1.field1
, table2.field1
, table3.field1
, table4.field1
from ((table1
inner join table2 on table1.keyfield = table2.keyfield)
inner join table3 on table2.keyfield = table3.keyfield)
inner join table4 on table3.keyfield = table4.keyfield