SQL BASIC COMMANDS

CONCAT : SELECT CONCAT(Address, ” “, PostalCode, ” “, City) AS Address FROM Customers; CONVERT TEXT TO LOWER TEXT. SELECT LCASE(“SQL Tutorial is FUN!”); SELECT TRIM(”    SQL Tutorial    “) AS TrimmedString; The INNER JOIN keyword selects records that have matching values in both tables. SELECT column_name(s) FROM table1 INNER JOIN table2 ON table1.column_name = table2.column_name; THREE TABLES: SELECT Orders.OrderID, Customers.CustomerName, Shippers.ShipperName FROM ((Orders INNER JOIN Customers ON Orders.CustomerID = Customers.CustomerID) INNER JOIN Shippers ON Orders.ShipperID = Shippers.ShipperID); LEFT SELECT column_name(s) FROM table1 LEFT JOIN table2 ON table1.column_name = table2.column_name; RIGHT SELECT column_name(s)… Seguir leyendo SQL BASIC COMMANDS

Publicada el
Categorizado como SQL