Debugging
Joins
DML
Constraints
Select Statement Basics
100

What is the error?

SELECT Name FROM Employees

What is missing semicolon

100

Join between two tables of matching data types

What is a natural join

100

list the answers in order: what command modifies a row, what command removes a row, and what command adds a row?

What is Update, Delete, and Insert

100

What is a sql constraint/what is it used for ?

Used to specify rules for data in a table

100

What is the name for individual statements EX: SELECT, FROM, WHERE

What is keyword

200

What is the error?

SELECT Id FROM Employees WHERE id = ‘1234’;

What is single quotes on an int

200

What join displays all information in the first table and all matching info from the second table?

What is Left join

200

What is the command used to make the system accept multiple Data Manipulation Language commands at once?

What is the Merge command

200

A check constraint ?

Ensures that the values in a column satisfies a specific condition

200

What is the use for ORDER BY

What is the keyword used for organizing data alphabetically in ascending or descending order

300

The goal is to display employee ids above 0123 in descending order. What is the error?

SELECT Id FROM Employees Where id > 0123 ORDER BY; 

What is order needs to specify descending

300

What type of join has the table join with itself?

What is self-join

300

DELETE FROM Employees WHERE ID = “003”; will remove what from the data sheet?

What is ID of employee 003?

300

In SQL, constraints can be divided into which of the following level?

Table and Column

300

What is the reason for the AND clause

What is multiple attribute restrictions

400

The goal is to display the student table and their class from the class table using the class name to connect them and display in descending order

SELECT student.name, class.name FROM students LEFT JOIN class ON table class.name = student.class ORDER BY DESC

What is missing semicolon

400

What type of join displays all matching info in both tables?

What is inner Join

400

How would you insert a new pickup truck car worth $5000 into a database called car shop? 

INSERT INTO car_shop ('car_id' int, 'car_type' varchar(20), 'car_price' int) VALUES ('1', 'pickup truck', '5000');

400

In SQL, which of the following constraint cannot be applied at the table level? 

- UNIQUE - PRIMARY KEY - CHECK - NOT NULL

NOT NULL

400

What is the Keyword needed to get data that states that employees are from all other sections (department) of the building except of ‘management’

what is WHERE NOT department = ‘management’

500

The goal is to display the employees table and their departments from the department table using their the department name to connect them and display in descending order 

SELECT employee.name, department.name FROM Employee RIGHT JOIN department ON table department.name = employee.department ORDER BY DESC;

What is use of right join instead of left join

500

(DAILY DOUBLE) What is the difference between a full join and a full outer join

What is no difference

500

In the event you need to update a student in a database to say that Dan Smith now has a ‘B’ as his grade

A5: What is UPDATE students SET grade = “B” WHERE student_name = 'Dan Smith';

500

The optional structure that is used to improve the performance of a query performed on a table in SQL

Index

500

What is the proper way to use a WHERE clause when discussing how to look for the students in a database called school that have a ‘D’ for grade

What is SELECT students FROM school WHERE grade IS ‘D’