WGU - C170 - Data Management Applications
Create Database Syntax ans: CREATE DATABASE db_name;
Simple SFW query syntax ans: SELECT * FROM db_name
... [Show More] WHERE column_name operator value;
Cardinality: Inside or outside? ans: Outside
Modality: Inside or outside? ans: Inside
What commands are used with data definition? ans: create, alter, drop, truncate, comment, rename
What commands are used with data manipulation? ans: Select, Insert, Update, Delete, Merge, Call, Explain Plan, Lock Table
Create Table Syntax ans: CREATE TABLE table_name
(
column_name1 data_type(size),
column_name2 data_type(size),
);
What does AUTO_INCREMENT attribute do for numeric values? ans: It generates a series of unique identifier values.
CREATE VIEW SYNTAX ans: CREATE VIEW view_name AS
SELECT column_name(s)
FROM table_name
WHERE condition
Primary Key Syntax ans: CREATE TABLE table_name
(
column1 data_type(size)
PRIMARY KEY (column1)
);
Create Index Syntax ans: CREATE INDEX index_name
ON table_name(column_name)
Insert syntax ans: INSERT INTO table_name
VALUES (value1,value2,value3,...);
Grant command syntax ans: GRANT privileges ON object TO user;
Drop Syntax: Table, Index, Database ans: DROP TABLE table_name;
ALTER TABLE table_name DROP INDEX index_name;
DROP DATABASE database_name
Count() Syntax ans: SELECT COUNT(column_name) FROM table_name;
returns # of values in a column
SELECT COUNT(*) FROM table_name; returns number of records in a table
Inner Join Description ans: Returns all rows when there is at least one match in BOTH tables
Left Join Description ans: Return all rows from the left table, and the matched rows from the right table
Right Join Description ans: Return all rows from the right table, and the matched rows from the left table
Full Join Description ans: Return all rows when there is a match in ONE of the tables
Join Syntax ans: SELECT columns
FROM table1
INNER/LEFT/RIGHT/FULL JOIN table2
ON table1.column = table2.column;
IN description & syntax ans: allows you to specify multiple values in a WHERE clause
SELECT column_name(s)
FROM table_name
WHERE column_name IN (value1,value2,...);
LIKE description & syntax ans: Used to search for a specified pattern in a column
SELECT column_name(s)
FROM table_name
WHERE column_name LIKE pattern; [Show Less]