Deck 5: SQL
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/100
Play
Full screen (f)
Deck 5: SQL
1
STUDENT
Observe the table STUDENT:
STUDENT
This table will be used for the following questions citing table STUDENT.
-How many records will the following query on table STUDENT return?
SELECT * FROM student WHERE name LIKE '%or%';
A)0
B)2
C)3
D)4
Observe the table STUDENT:
STUDENT
This table will be used for the following questions citing table STUDENT.
-How many records will the following query on table STUDENT return?
SELECT * FROM student WHERE name LIKE '%or%';
A)0
B)2
C)3
D)4
4
2
Which of the following statements would be used to change a value in a record of a table?
A)CREATE TABLE
B)ALTER TABLE
C)INSERT INTO
D)UPDATE
A)CREATE TABLE
B)ALTER TABLE
C)INSERT INTO
D)UPDATE
D
3
What is the result of the following SQL query?
SELECT ename,esalary * 1.1 FROM employee;
A)For each employee,the query will display the name,the salary,and all other columns from the table employee
B)For each employee,the query will display the name,the salary,all other columns from the table employee,and the number 1.1
C)For each employee,the query will display the name and the salary increased by 10%
D)For each employee,the query will display the name and 10% of the salary
SELECT ename,esalary * 1.1 FROM employee;
A)For each employee,the query will display the name,the salary,and all other columns from the table employee
B)For each employee,the query will display the name,the salary,all other columns from the table employee,and the number 1.1
C)For each employee,the query will display the name and the salary increased by 10%
D)For each employee,the query will display the name and 10% of the salary
C
4
HAPPY INSURANCE
Observe the HAPPY INSURANCE DATABASE:
CLIENT
AGENT
AREA
This database will be used for the following questions citing tables from the HAPPY INSURANCE database.
-What will be retrieved by the following query on the table CLIENT?
SELECT DISTINCT clientname FROM client WHERE clientspousename = 'Amy';
A)Name Amy twice
B)Name Amy
C)Name Cole
D)Names Andy and Cole
Observe the HAPPY INSURANCE DATABASE:
CLIENT
AGENT
AREA
This database will be used for the following questions citing tables from the HAPPY INSURANCE database.
-What will be retrieved by the following query on the table CLIENT?
SELECT DISTINCT clientname FROM client WHERE clientspousename = 'Amy';
A)Name Amy twice
B)Name Amy
C)Name Cole
D)Names Andy and Cole
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
5
HAPPY INSURANCE
Observe the HAPPY INSURANCE DATABASE:
CLIENT
AGENT
AREA
This database will be used for the following questions citing tables from the HAPPY INSURANCE database.
-How many records will be retrieved by the following query on table AGENT?
SELECT a.agentname,s.agentname
FROM agent a,agent s
WHERE a.supervisedby = s.agentid;
A)0
B)1
C)2
D)4
Observe the HAPPY INSURANCE DATABASE:
CLIENT
AGENT
AREA
This database will be used for the following questions citing tables from the HAPPY INSURANCE database.
-How many records will be retrieved by the following query on table AGENT?
SELECT a.agentname,s.agentname
FROM agent a,agent s
WHERE a.supervisedby = s.agentid;
A)0
B)1
C)2
D)4
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
6
What is the result of the following SQL statement?
UPDATE employee
SET salary = 50000
WHERE salary < 50000;
A)The statement sets the salary for each employee to below 50,000
B)The statement sets the salary of each employee to 50,000 and ensures that the salary cannot drop below 50,000
C)The statement increases salary to 50,000 for each employee whose salary is below 50,000
D)The statement sets the salary of each employee to 50,000
UPDATE employee
SET salary = 50000
WHERE salary < 50000;
A)The statement sets the salary for each employee to below 50,000
B)The statement sets the salary of each employee to 50,000 and ensures that the salary cannot drop below 50,000
C)The statement increases salary to 50,000 for each employee whose salary is below 50,000
D)The statement sets the salary of each employee to 50,000
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
7
Which of the following is an invalid SQL keyword?
A)Select
B)SE_LECT
C)selectT
D)SeLeCt
A)Select
B)SE_LECT
C)selectT
D)SeLeCt
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
8
STUDENT
Observe the table STUDENT:
STUDENT
This table will be used for the following questions citing table STUDENT.
-Which of the following queries on table STUDENT will return number 2 as a result?
A)SELECT COUNT(*)FROM student;
B)SELECT COUNT(name)FROM student;
C)SELECT COUNT(class)FROM student;
D)SELECT COUNT(DISTINCT class)FROM student;
Observe the table STUDENT:
STUDENT
This table will be used for the following questions citing table STUDENT.
-Which of the following queries on table STUDENT will return number 2 as a result?
A)SELECT COUNT(*)FROM student;
B)SELECT COUNT(name)FROM student;
C)SELECT COUNT(class)FROM student;
D)SELECT COUNT(DISTINCT class)FROM student;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
9
Which of the following statements would be used to drop a column from the table?
A)CREATE TABLE
B)ALTER TABLE
C)DROP TABLE
D)UPDATE
A)CREATE TABLE
B)ALTER TABLE
C)DROP TABLE
D)UPDATE
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
10
What is the result of the following SQL query?
SELECT ename
FROM employee
WHERE esalary = (SELECT MAX(salary)FROM employee);
A)The query displays the number that represents how many employees share the highest salary
B)The query displays the salary of the employee (or employees)with the highest salary
C)The query displays the name and the salary of the employee (or employees)with the highest salary
D)The query displays the name of the employee (or employees)with the highest salary
SELECT ename
FROM employee
WHERE esalary = (SELECT MAX(salary)FROM employee);
A)The query displays the number that represents how many employees share the highest salary
B)The query displays the salary of the employee (or employees)with the highest salary
C)The query displays the name and the salary of the employee (or employees)with the highest salary
D)The query displays the name of the employee (or employees)with the highest salary
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
11
HAPPY INSURANCE
Observe the HAPPY INSURANCE DATABASE:
CLIENT
AGENT
AREA
This database will be used for the following questions citing tables from the HAPPY INSURANCE database.
-Which of the following sequences of CREATE TABLE statements for HAPPY INSURANCE database is in correct order?
A)CREATE TABLE area
CREATE TABLE client
CREATE TABLE agent
B)CREATE TABLE area
CREATE TABLE agent
CREATE TABLE client
C)CREATE TABLE client
CREATE TABLE agent
CREATE TABLE area
D)CREATE TABLE agent
CREATE TABLE client
CREATE TABLE area
Observe the HAPPY INSURANCE DATABASE:
CLIENT
AGENT
AREA
This database will be used for the following questions citing tables from the HAPPY INSURANCE database.
-Which of the following sequences of CREATE TABLE statements for HAPPY INSURANCE database is in correct order?
A)CREATE TABLE area
CREATE TABLE client
CREATE TABLE agent
B)CREATE TABLE area
CREATE TABLE agent
CREATE TABLE client
C)CREATE TABLE client
CREATE TABLE agent
CREATE TABLE area
D)CREATE TABLE agent
CREATE TABLE client
CREATE TABLE area
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
12
Which of the following is a part of a DDL statement?
A)CREATE
B)INSERT
C)DELETE
D)SELECT
A)CREATE
B)INSERT
C)DELETE
D)SELECT
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
13
Which of the following is an invalid SQL statement?
A)SELECT
*
FROM
Employee;
B)SELECT *
FROM employee;
C)SELECT * FROM employee;
D)SELECT *,
FROM employee;
A)SELECT
*
FROM
Employee;
B)SELECT *
FROM employee;
C)SELECT * FROM employee;
D)SELECT *,
FROM employee;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
14
STUDENT
Observe the table STUDENT:
STUDENT
This table will be used for the following questions citing table STUDENT.
-Which of the following queries on table STUDENT will return three values as a result?
A)SELECT name FROM student WHERE class != 'Sophomore';
B)SELECT name FROM student;
C)SELECT DISTINCT name FROM student;
D)SELECT class FROM student;
Observe the table STUDENT:
STUDENT
This table will be used for the following questions citing table STUDENT.
-Which of the following queries on table STUDENT will return three values as a result?
A)SELECT name FROM student WHERE class != 'Sophomore';
B)SELECT name FROM student;
C)SELECT DISTINCT name FROM student;
D)SELECT class FROM student;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
15
HAPPY INSURANCE
Observe the HAPPY INSURANCE DATABASE:
CLIENT
AGENT
AREA
This database will be used for the following questions citing tables from the HAPPY INSURANCE database.
-How many records will be retrieved by the following query on tables AGENT and AREA?
SELECT *
FROM agent ag,area a
WHERE ag.agentarea = a.areaid;
A)0
B)3
C)4
D)12
Observe the HAPPY INSURANCE DATABASE:
CLIENT
AGENT
AREA
This database will be used for the following questions citing tables from the HAPPY INSURANCE database.
-How many records will be retrieved by the following query on tables AGENT and AREA?
SELECT *
FROM agent ag,area a
WHERE ag.agentarea = a.areaid;
A)0
B)3
C)4
D)12
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
16
STUDENT
Observe the table STUDENT:
STUDENT
This table will be used for the following questions citing table STUDENT.
-What will be the result of the following query on table STUDENT?
SELECT * from STUDENT;
A)The entire relation STUDENT will be displayed
B)StudentID column of the relation STUDENT will be displayed
C)First record of the relation STUDENT will be displayed
D)Last record of the relation STUDENT will be displayed
Observe the table STUDENT:
STUDENT
This table will be used for the following questions citing table STUDENT.
-What will be the result of the following query on table STUDENT?
SELECT * from STUDENT;
A)The entire relation STUDENT will be displayed
B)StudentID column of the relation STUDENT will be displayed
C)First record of the relation STUDENT will be displayed
D)Last record of the relation STUDENT will be displayed
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
17
STUDENT
Observe the table STUDENT:
STUDENT
This table will be used for the following questions citing table STUDENT.
-What will be the result of the following query on table STUDENT?
SELECT COUNT( *)FROM student GROUP BY class;
A)Number 5
B)Number 2
C)Numbers 2 and 3
D)Numbers 1 and 1
Observe the table STUDENT:
STUDENT
This table will be used for the following questions citing table STUDENT.
-What will be the result of the following query on table STUDENT?
SELECT COUNT( *)FROM student GROUP BY class;
A)Number 5
B)Number 2
C)Numbers 2 and 3
D)Numbers 1 and 1
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
18
Which of the following is a part of a DML statement?
A)CREATE
B)ALTER
C)DROP
D)SELECT
A)CREATE
B)ALTER
C)DROP
D)SELECT
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
19
STUDENT
Observe the table STUDENT:
STUDENT
This table will be used for the following questions citing table STUDENT.
-What will be the result of the following query on table STUDENT?
SELECT COUNT( *)FROM student GROUP BY class HAVING COUNT(*)<3;
A)Number 5
B)Number 2
C)Numbers 2 and 3
D)Numbers 1 and 1
Observe the table STUDENT:
STUDENT
This table will be used for the following questions citing table STUDENT.
-What will be the result of the following query on table STUDENT?
SELECT COUNT( *)FROM student GROUP BY class HAVING COUNT(*)<3;
A)Number 5
B)Number 2
C)Numbers 2 and 3
D)Numbers 1 and 1
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
20
HAPPY INSURANCE
Observe the HAPPY INSURANCE DATABASE:
CLIENT
AGENT
AREA
This database will be used for the following questions citing tables from the HAPPY INSURANCE database.
-Which of the following sequences of DROP TABLE statements for HAPPY INSURANCE database is in correct order?
A)DROP TABLE area
DROP TABLE client
DROP TABLE agent
B)DROP TABLE area
DROP TABLE agent
DROP TABLE client
C)DROP TABLE client
DROP TABLE agent
DROP TABLE area
D)DROP TABLE agent
DROP TABLE client
DROP TABLE area
Observe the HAPPY INSURANCE DATABASE:
CLIENT
AGENT
AREA
This database will be used for the following questions citing tables from the HAPPY INSURANCE database.
-Which of the following sequences of DROP TABLE statements for HAPPY INSURANCE database is in correct order?
A)DROP TABLE area
DROP TABLE client
DROP TABLE agent
B)DROP TABLE area
DROP TABLE agent
DROP TABLE client
C)DROP TABLE client
DROP TABLE agent
DROP TABLE area
D)DROP TABLE agent
DROP TABLE client
DROP TABLE area
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
21
VEHICLE
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return 4 values:
SELECT DISTINCT type FROM vehicle;
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return 4 values:
SELECT DISTINCT type FROM vehicle;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
22
What is the purpose of DROP TABLE command?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
23
What is the purpose of DDL statements?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
24
VEHICLE
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return 4 values:
SELECT make FROM vehicle;
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return 4 values:
SELECT make FROM vehicle;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
25
VEHICLE
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return two numbers:
SELECT COUNT(*)from vehicle GROUP BY ownername;
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return two numbers:
SELECT COUNT(*)from vehicle GROUP BY ownername;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
26
VEHICLE
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return 2 values:
SELECT DISTINCT ownerid,ownername FROM vehicle;
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return 2 values:
SELECT DISTINCT ownerid,ownername FROM vehicle;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
27
What is the purpose of a ";" (semicolon)in the SQL statement?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
28
VEHICLE
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return 4 values:
SELECT vehicleid FROM vehicle;
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return 4 values:
SELECT vehicleid FROM vehicle;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
29
A query retrieving the data from one relation can be used to populate another relation.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
30
What is the purpose of the CREATE TABLE command?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
31
VEHICLE
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return two numbers:
SELECT COUNT(*)from vehicle GROUP BY ownerid;
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return two numbers:
SELECT COUNT(*)from vehicle GROUP BY ownerid;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
32
VEHICLE
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return 4 values:
SELECT ownerid FROM vehicle;
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return 4 values:
SELECT ownerid FROM vehicle;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
33
What is the purpose of DML statements?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
34
TCL commands facilitate the process of data access control.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
35
DCL commands are used to manage database transactions.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
36
VEHICLE
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return 2 values:
SELECT DISTINCT ownername FROM vehicle;
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return 2 values:
SELECT DISTINCT ownername FROM vehicle;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
37
It is possible to join two tables without joining a foreign key column in one table with a primary key column in another table.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
38
VEHICLE
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return 4 values:
SELECT type FROM vehicle;
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return 4 values:
SELECT type FROM vehicle;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
39
VEHICLE
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return two numbers:
SELECT COUNT(*)from vehicle GROUP BY ownername HAVING COUNT(*)> 1;
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return two numbers:
SELECT COUNT(*)from vehicle GROUP BY ownername HAVING COUNT(*)> 1;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
40
VEHICLE
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return one number:
SELECT COUNT(*)from vehicle;
Observe the table VEHICLE that contains the following four records:
VEHICLE
This table will be used for the following questions citing table VEHICLE.
-The following query on table VEHICLE will return one number:
SELECT COUNT(*)from vehicle;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
41
What is an outer query?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
42
What is the purpose of the HAVING keyword?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
43
When are two sets of columns union compatible?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
44
What is a view?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
45
In which case will the result of the statement in the following form
COUNT(column_name)FROM table
not be equal to the number of records in the table?
COUNT(column_name)FROM table
not be equal to the number of records in the table?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
46
What is the purpose of the GROUP BY keyword?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
47
What is the purpose of the DISTINCT keyword?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
48
What is the purpose of the ORDER BY keyword?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
49
What is determined by the WHERE condition in the SELECT statement?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
50
What is the purpose of the UPDATE command in SQL?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
51
When does a circular foreign key dependency occur?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
52
What is the purpose of the ALTER TABLE command?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
53
List the SQL aggregate functions.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
54
What is the purpose of the DELETE command in SQL?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
55
What is a self-JOIN?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
56
List the SQL set operators.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
57
What is the purpose of the JOIN operation?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
58
Why is the following query invalid:
SELECT productname,COUNT (*)
FROM PRODUCT;
SELECT productname,COUNT (*)
FROM PRODUCT;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
59
What is a nested query?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
60
What is the purpose of the LIKE keyword?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
61
STUDENT
Observe the table STUDENT:
STUDENT

Write an SQL query on the table STUDENT that lists records (all columns)for all freshman students.
Observe the table STUDENT:
STUDENT

Write an SQL query on the table STUDENT that lists records (all columns)for all freshman students.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
62
STUDENT
Observe the table STUDENT:
STUDENT

Write an SQL query on the table STUDENT that for each class lists the class and the number of students in the class.
Observe the table STUDENT:
STUDENT

Write an SQL query on the table STUDENT that for each class lists the class and the number of students in the class.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
63
STUDENT
Observe the table STUDENT:
STUDENT

Write an SQL query on the table STUDENT that lists the student ID for each student whose name is Connor.
Observe the table STUDENT:
STUDENT

Write an SQL query on the table STUDENT that lists the student ID for each student whose name is Connor.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
64
When can the NOT operator be used?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
65
What is a correlated query and how is it used in conjunction with the EXISTS operator?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
66
HAPPY INSURANCE
Observe the HAPPY INSURANCE DATABASE:
CLIENT
AGENT
AREA

Show the CREATE TABLE statements for the table AGENT (assume that non-primary key columns can be optional. )
Observe the HAPPY INSURANCE DATABASE:
CLIENT



Show the CREATE TABLE statements for the table AGENT (assume that non-primary key columns can be optional. )
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
67
HAPPY INSURANCE
Observe the HAPPY INSURANCE DATABASE:
CLIENT
AGENT
AREA

Show the CREATE TABLE statements for the table AREA (assume that non-primary key columns can be optional. )
Observe the HAPPY INSURANCE DATABASE:
CLIENT



Show the CREATE TABLE statements for the table AREA (assume that non-primary key columns can be optional. )
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
68
VEHICLE
Observe the table VEHICLE that contains the following four records:
VEHICLE

Write the SQL query on the table VEHICLE that lists the owner ID and owner name for each owner who owns a Ford vehicle or any type of truck.
Observe the table VEHICLE that contains the following four records:
VEHICLE

Write the SQL query on the table VEHICLE that lists the owner ID and owner name for each owner who owns a Ford vehicle or any type of truck.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
69
HAPPY INSURANCE
Observe the HAPPY INSURANCE DATABASE:
CLIENT
AGENT
AREA

Show the INSERT INTO statements for the table AREA.
Observe the HAPPY INSURANCE DATABASE:
CLIENT



Show the INSERT INTO statements for the table AREA.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
70
When is the IS NULL comparison used?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
71
VEHICLE
Observe the table VEHICLE that contains the following four records:
VEHICLE

Write the SQL query on the table VEHICLE that lists once the owner ID and owner name of each owner.
Observe the table VEHICLE that contains the following four records:
VEHICLE

Write the SQL query on the table VEHICLE that lists once the owner ID and owner name of each owner.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
72
VEHICLE
Observe the table VEHICLE that contains the following four records:
VEHICLE

Show the INSERT INTO statements for the table VEHICLE.
Observe the table VEHICLE that contains the following four records:
VEHICLE

Show the INSERT INTO statements for the table VEHICLE.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
73
What is an OUTER JOIN?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
74
VEHICLE
Observe the table VEHICLE that contains the following four records:
VEHICLE

Write the SQL query on the table VEHICLE that lists for each owner the OwnerID,OwnerName,and the number of vehicles each owner owns,sorted by the number of vehicles each owner owns (in ascending order. )
Observe the table VEHICLE that contains the following four records:
VEHICLE

Write the SQL query on the table VEHICLE that lists for each owner the OwnerID,OwnerName,and the number of vehicles each owner owns,sorted by the number of vehicles each owner owns (in ascending order. )
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
75
HAPPY INSURANCE
Observe the HAPPY INSURANCE DATABASE:
CLIENT
AGENT
AREA

Show the CREATE TABLE statements for the table CLIENT (assume that non-primary key columns can be optional. )
Observe the HAPPY INSURANCE DATABASE:
CLIENT



Show the CREATE TABLE statements for the table CLIENT (assume that non-primary key columns can be optional. )
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
76
STUDENT
Observe the table STUDENT:
STUDENT

Show the INSERT INTO statements for the table STUDENT.
Observe the table STUDENT:
STUDENT

Show the INSERT INTO statements for the table STUDENT.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
77
List the three variations of OUTER JOIN?
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
78
STUDENT
Observe the table STUDENT:
STUDENT

Show the CREATE TABLE statements for the table STUDENT (assume that non-primary keys are optional. )
Observe the table STUDENT:
STUDENT

Show the CREATE TABLE statements for the table STUDENT (assume that non-primary keys are optional. )
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
79
VEHICLE
Observe the table VEHICLE that contains the following four records:
VEHICLE

Show the CREATE TABLE statements for the table VEHICLE (assume that non-primary key columns can be optional. )
Observe the table VEHICLE that contains the following four records:
VEHICLE

Show the CREATE TABLE statements for the table VEHICLE (assume that non-primary key columns can be optional. )
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
80
VEHICLE
Observe the table VEHICLE that contains the following four records:
VEHICLE

Write the SQL query on the table VEHICLE that lists the owner ID and owner name for each owner who owns a Ford vehicle.
Observe the table VEHICLE that contains the following four records:
VEHICLE

Write the SQL query on the table VEHICLE that lists the owner ID and owner name for each owner who owns a Ford vehicle.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck