DP - Section 1 (2) Flashcards
In its simplest form, a SELECT statement must include the following: 2
- SELECT clause
- FROM clause
……….. ………: Specifies the columns to be displayed (or use * symbol to display all columns).
SELECT clause
………… ………….: Specifies the table containing the column(s) listed in the select clause.
FROM clause
…………..: An implementation of an attribute or relationship in a table.
Column
A ……………. refers to a individual SQL Command
Keyword
for example SELECT and FROM are keywords
A …………… is part of SQL statement
clause
For example, SELECT Last_name is a clause
A ………….. is combination of two or more clauses
statement
For example, SELECT last_name From employees is statement
The following SQL style conventions are used throughout this course:
- SQL Keywords in ………………………………
- Column and table names in …………………………
- Each clause on a ………………….
- UPPERCASE – e.g. SELECT, FROM, WHERE.
- lower case – e.g. first_name, employees.
- new line – e.g:
SELECT last_name
FROM employees
WHERE employee_id = 101;
Capabilities of SELECT Statements ……………… 2
- Projection
- Selection
………………: Used to choose rows in a table
Selection
……………: Used to choose columns in a table
Projection
The …………… clause determines Projection
The ………….. clause determines Selection.
SELECT
WHERE
Sometimes doing a SELECT * FROM table can take a long time to return the data. It all depends on the number of rows stored in that particular table. Remember, Oracle tables can store millions of rows of data.
R 1
All examples on the slides have a ………….. after each statement. Oracle Application Express does not require this syntax, but other Oracle SQL Interfaces do, so we have included them in the courseware.
semicolon