Selecting Data

Syntax: To retrieve data from a table:

SELECT column1, column2 FROM table_name WHERE condition;

Example:

SELECT first_name, last_name FROM employees WHERE hire_date > '2023-01-01';

Selecting All Columns: Use an asterisk (*) to select all columns:

SELECT * FROM employees;


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *