Unit 3 Flashcards
SELECT * INTO Table
used for copy data to another.
DELETE
remove row(s).
TRUNCATE
remove all rows.
DROP
remove table.
UPDATE
change the values in row(s) for one table at a time. Used with SET and WHERE.
SET
specific columns to contain specific values. Nested select statement can be used here to make that value and aggregate. Used with UPDATE.
Which of these commands does not change the tables in a DB?
- INSERT
- DELETE
- UPDATE
- SELECT
SELECT
LIKE
Used with the “%” character. Also used as NOT LIKE.
SELECT CONCAT(attr1, attr2) FROM Table
Used to represent values of two attributes in one column.
SELECT studentName AS Name FROM TABLE
Alias, used to label columns of results to clarify query results.
UPPER(), LOWER()
change casing of results.
LTRIM(), RTRIM()
take trailing spaces or specific characters off of values in column.
LEFT(), RIGHT()
selecting only a part of the characters in values in column.
CAST(attr1 AS INT)
Used to cast the datatypes of a column. Usually used with ROUND().
WHERE empID IN (‘AJ01’, ‘GB01’)
Used to find a list of specific values in a column.