Querying data in SQL

Querying data in SQL usually means retrieving information from a database using the SELECT statement. Let me give you a structured overview with examples:


🔹 Basic Query

SELECT column1, column2
FROM table_name;
  • SELECT → specifies the columns you want
  • FROM → specifies the table

Example:

SELECT first_name, last_name
FROM employees;

🔹 Select All Columns

SELECT *
FROM table_name;

Example:

SELECT *
FROM employees;

Leave a Reply