The SELECT
statement is used to retrieve data from a database. You can specify which columns you want to retrieve, which table to retrieve them from, and conditions to filter the data.
Example:
SELECT FirstName, LastName FROM Employees;
This query retrieves the first and last names of all employees from the "Employees" table.
The WHERE
clause is used to filter data based on specific conditions. It's often used with the SELECT
statement to retrieve specific rows that match the given criteria.
Example:
SELECT ProductName, Price FROM Products WHERE Price > 50;
This query retrieves the names and prices of products with a price greater than $50.