SELECT DECK 2 Flashcards
What’s the basic form of a query in SQL?
SELECT . . . FROM . . . WHERE
What happens if you use the asterisk wildcard after the SELECT keyword in a query?
SELECT returns all columns.
Unless specified otherwise, the results of a query are returned in (Alpha, Numeric, Random) order?
Random.
What clause is used to set a sort order on returned query results?
ORDER BY
What keyword is added to ORDER BY to specify a descending sort?
DESC
What is the default sort for ORDER BY?
Ascending.
In this example, what does select_list represent? SELECT select_list FROM source_list
The list of columns from which data is returned by the query.
In this example, what does source_list represent? SELECT select_list FROM source_list
The list of tables or views from which the query gathers data.
What is a VIEW?
A VIEW is a database object which presents data gathered from other tables or views.
What is a SCHEMA OBJECT?
A SCHEMA OBJECT is a logical strcture stored within a SCHEMA.
What is a SCHEMA?
A SCHEMA is a description of data, including tables, fields, tuples and relationships within a database.
What is a SCHEMA in Oracle?
Same as a normal SCHEMA, except that in Oracle it’s also synonymous with a User.
In SQL, a . . . is the basic unit of storage which holds all user-accessible data.
TABLE
In SQL, each TABLE contains . . . that represent individual RECORDS.
ROWS
In SQL, each TABLE contains ROWS that represent individual . . .
RECORDS
In SQL, rows are composed of COLUMNS that represent individual . . . for each record.
FIELDS
In SQL, rows are composed of . . . that represent individual FIELDS for each record.
COLUMNS
What’s the Relational Algebra name for a ROW?
Tuple
What’s the Relational Algebra name for a COLUMN?
Attribute