Select
From Oracle FAQ
Select is a SQL command used to query data from one or more database tables.
[edit]
Examples
Select all columns and all rows from the emp table:
SELECT * FROM emp;
Select the salary column for employee number 7788:
SELECT sal FROM emp WHERE empno = 7788;
Sort rows and return them in order:
SELECT ename, sal FROM emp ORDER BY sal;
Group rows together:
SELECT deptno,
COUNT(*) "Employees in department",
SUM(sal) "Total salaries for department",
AVG(sal) "Avarage salary for department"
FROM emp GROUP BY deptno;
[edit]
Also see
| Glossary of Terms | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | # |

