Common select various query formats:
General Query
1. Select * FROM table name
2. Select * FROM table name where column name + condition
Internal connection
3. Select column name, column name from table name 1 inner JOIN table name 1 on table Name 2. column name = table Name 2. Column name ... Two-table connection
4. Select column name, column name from table name 1 inner JOIN table name 1 on table Name 2. column name = table Name 2. column name inner JOIN table name 3 on table Name 2. column name = table name 3. Column name ... Three-table connection
...........
External links
Left outer link:
5. Select column name, column name from table name 1 LEFT OUTER JOIN table name 2 on table name 1. column name = table Name 2. Column Name
Right outer link:
6. Select column name, column name from table name 1 right outer join table name 2 on table name 1. column name = table Name 2. Column Name
Instance:
Select P.productname, s.companyname from products p inner joins suppliers s on p.supplierid = S.supplierid
Select o.orderid,productname,orderdate from Orders o inner joins [order Details] od on O.orderid=od.orderid inner JOIN PROD Ucts p on Od.productid=p.productid
Select connection query Statement "SQL statement query"