Practice Test 3 Flashcards
Combines two tables into one result (Includes all columns and all combinations of rows from both tables)
Product
Selects one or more columns from a table
Project
Provides all possible combinations of rows from both tables
Cross Join
Combines the results of two queries into a single result set
Union
Why are alias needed in self join
To be able to differentiate between the two outputted tables
What is used as a wildcard to represent any character
%
Aggregates rows that have the same values in a specified column
Group By
This filters rows after adding a Group By operand
HAVING
Filters and removes duplicate rows
DISTINCT
How would you add a new Column to table
ALTER TABLE ADD
How do you rename a Column
ALTER TAABLE CHANGE
Ends the current transaction and makes all changes permanent
COMMIT
Undo changes made in a current transaction
ROLLBACK
How do you create an index on a column
CREATE INDEX
How do you add a constraint to a table
ALTER TABLE ADD CONSTRAINT
How do you remove a constraint from a table
ALTER TABLE DROP CONSTRAINT
SQL Keyword to specifies a foreign key
FOREIGN KEY
What does CREATE VIEW do?
Creates a virtual table based on the result set of a select query
Bridge or Junction table
Used in a many-to-many relationship to resolve them into two 1-M
Removes partial dependencies
2NF or second normal form
BOYCE-CODD normal form
Eliminates all common redundancy and considered the gold standard
3NF
Dependent on the entire primary key and nothing but the key
Entity type Means
TABLE
A unique Clustered Index is auto made when….
A primary key is created