?
???? SELECT ?? ?????? ?? ?? ????? ?? ????? ????????. ??????? ???????? ???????? ?? ???? ???? ?? ??? ?????. ?? ??? ?????? ?????? ??? ?????? ???????? ?????? ?????????.
The SELECT statement is the foundation of database interaction. It is used to retrieve data from one or more tables. In this lesson, we will explore the basic syntax and how to use it.
"????? ???? SELECT ?? ??????? ???? ?? ????? ?????? ???????." "Mastering the SELECT statement is the key to understanding any relational database."
???????? ?? ??????? ?? ???? ????? ?????? ????? ?????? (*):
To retrieve all columns from a specific table, we use the asterisk (*):
SELECT *
FROM employees;
??? ??? ????? ??????? ????? ????? ???? ????? ?????? ????? ??????? ?????? ??????: If we want to retrieve specific columns, we list the column names separated by commas:
SELECT first_name, last_name, salary
FROM employees;
?????? ???? WHERE ?????? ???? ????? ??? ?? ????? ?? ???????? ?????????. ??? ???? ??????? ??????? ???????? ????? ???? ??????? ?? 5000:
We use the WHERE clause to specify conditions that the retrieved data must meet. For example, to retrieve employees whose salary is greater than 5000:
SELECT first_name, last_name, salary
FROM employees
WHERE salary > 5000;
?? ????? ?? ???? ???? ??????: Or to search for a specific employee by name:
SELECT employee_id, first_name
FROM employees
WHERE last_name = 'Smith'; -- Case sensitive in Oracle