ch6-ppt Flashcards
(19 cards)
DDL
data definition language. DEFINE database. create tables and constraints
DML
data manipulation language. MAINTAIN and QUERY database
DCL
data control language. CONTROL a database, administer previledges
CREATE SCHEMA
defines portion of database owned by particular owner
CREATE TABLE
define new table and columns
CREATE VIEW
define logical table from one of more tables or views
ALTER TABLE
cahnge column specifications
INSERT INTO
populate table. can also be used to copy and paste table using a SELECT statement
UPDATE
modify all rows with a condition
SELECT statement basic clauses
1- SELECT
2- FROM
3- WHERE
WHERE
conditional operator. answers which rows will be included in the result
LIKE
use only for wildcard conditionals
wildcards
- (any sequence at beg or end)
? (any character)
use LIKE conditional
BETWEEN date usage
surround dates with pound signs #
expressions
AS statements used to rename colums in the resulting query.
aggregate functions
1-COUNT()
2-MIN/MAX()
3-AVG()
4-SUM()
ORDER BY
last element in SELECT statement. organize in abc order. use DESC for descending.
GROUP BY
summary row for each unique GROUP
HAVING
quality groups by a conditional