Syntax
SELECT {Table1|Alias1}.Field1 [,...] , {Table2|Alias2}.Field2 [,...]
FROM Table1 [Alias1], Table2 [Alias2]
before SQL92 (no join declaration at all)
FROM Table1 [Alias1] CROSS JOIN Table2 [Alias2]
SQL92 (explicit declaration of a cross join)
Syntax
FROM Table1 [Alias1] FULL JOIN Table2 [Alias2] ON {Table1|Alias1}.Field1 = {Table2|Alias2}.Field2
SQL92 (explicit declaration of a full or union join)
SELECT Fieldlist FROM Table1 [Alias1] LEFT JOIN Table2 [Alias2] ON {Table1|Alias1}.Field1 = {Table2|Alias2}.Field2 UNION
SELECT Fieldlist FROM Table1 [Alias1] RIGHT JOIN Table2 [Alias2] ON {Table1|Alias1}.Field1 = {Table2|Alias2}.Field2
SQL92 (if a direct declaration of a full or union join is not supported by the database system)
Syntax
WHERE a.Field1 = b.Field2
before SQL92 (implicit declaration of table joins)
The SQL command for querying data in a database is very powerfull and therefore can be quite complex. To adres sthat problem I provide here a small step by step tutorial how to build a SELECT command. May be it is easier for you to answer the following questions and to build so your custom SELECT command step by step: