Chapter 23 Test Questions & Answers Relational Databases - Big Java Early Objects 5e Complete Test Bank by Cay S. Horstmann. DOCX document preview.
Course Title: Big Java, Early Objects
Chapter Number: 23 Relational Databases
Question type: Multiple Choice
1) Insert the statement that would remove the following table from the database.
CREATE TABLE Course
(
Course_ID VARCHAR(11),
Credits VARCHAR(4),
Room_No INT(4)
)
____________________
a) DELETE TABLE Course
b) TRUNCATE TABLE Course
c) DROP Course
d) DROP TABLE Course
Title: Statement to remove a table from a database.
Difficulty: Easy
Section Reference 1: 23.1 Organizing Database Information
2) A _____________ is a column (or set of columns) whose value uniquely specifies a table record.
a) foreign key
b) primary key
c) column headers
d) data type
Title: A ___ is a column...whose value uniquely specifies a record.
Difficulty: Easy
Section Reference 1: 23.1 Organizing Database Information
3) A ____________ is a reference to a primary key in a linked table.
a) foreign key
b) primary key
c) column headers
d) data type
Title: A ___ is a reference to a primary key.
Difficulty: Easy
Section Reference 1: 23.1 Organizing Database Information
4) Complete the following statement, which inserts rows into the following Course table.
____________________ VALUES ('CS221', 'Data Structures', '4', 'J. Jones')
Course table
Course_ID | CourseName | Credits | Professor |
CS605 | Introduction to Java Programming | 3 | A. Smith |
a) INSERT INTO Course table
b) INSERT FROM Course
c) INSERT INTO Course
d) INSERT INTO Table Course
Title: Complete this SQL statement that inserts a row.
Difficulty: Easy
Section Reference 1: 23.1 Organizing Database Information
5) In the table below, the ____ correspond(s) to the attributes of a customer in the database.
Customer table
Customer_Number | FirstName | LastName | Address | City | State | Zip |
3175 | Gregory | Adams | 100 Main Street | Anytown | CA | 98765 |
3176 | Lincoln | Hall | 1175 Liberty Ave | Pleasantville | MI | 45066 |
a) foreign key
b) primary key
c) column headers
d) data type
Title: The ____ correspond(s) to the attributes of a customer in the database.
Difficulty: Easy
Section Reference 1: 23.1 Organizing Database Information
6) In database terminology, a column (or combination of columns) that uniquely identifies a row in a table is called a(n) ____.
a) data type
b) attribute
c) primary key
d) column header
Title: A column that uniquely identifies a table row is a ____.
Difficulty: Easy
Section Reference 1: 23.1 Organizing Database Information
7) Which of the following table attributes could be a unique identifier for a person?
a) Nameb) SocialSecurityNumberc) Stated) Birthday
Title: Which of these table attributes represents a unique identifier?
Difficulty: Easy
Section Reference 1: 23.1 Organizing Database Information
8) Which of the following statements is correct?
a) SQL uses double quotes (") to delimit strings.b) The SQL command INSERT AT adds data to a databasec) SQL is not case sensitive.d) SQL is a part of the Java API.
Title: Which of these statements about SQL is correct?
Difficulty: Easy
Section Reference 1: 23.1 Organizing Database Information
9) Based on the customer table below, which of the attributes do you think represents the primary key?
Customer table
Customer_Number | Name | Address | City | State | Zip |
3175 | Sam’s Small Appliances | 100 Main Street | Anytown | CA | 98765 |
3176 | Electronics Unlimited | 175 Liberty Ave | Pleasantville | MI | 45066 |
a) Addressb) Namec) Customer_Numberd) Zip
Title: Which is the primary key in this table?
Difficulty: Easy
Section Reference 1: 23.1 Organizing Database Information
10) Which of the following would be a good primary key for a Course table designed to hold course information for a university?
a) CourseName
b) CourseID
c) CourseCredit
d) CoursePrerequisites
Title: Which of these would be a good primary key for a Course table?
Difficulty: Easy
Section Reference 1: 23.1 Organizing Database Information
11) In SQL, the _____________ command is used to issue queries.
a) QUERY
b) UPDATE
c) START
d) SELECT
Title: The ___ SQL command is used to issue queries.
Difficulty: Easy
Section Reference 1: 23.2 Queries
12) In SQL, the _____________ command is used to issue queries that do not modify the database.
a) APPEND
b) UPDATE
c) MODIFY
d) SELECT
Title: The ___ command...does not modify the database.
Difficulty: Easy
Section Reference 1: 23.2 Queries
13) The outcome of a SQL query is a ____________________.
a) table
b) view of the data
c) list
d) subquery
Title: The outcome of a SQL query is a ___.
Difficulty: Medium
Section Reference 1: 23.2 Queries
14) A ____________ is a set of rows and columns that provides a "window" through which you can see some of the database data.
a) table
b) view
c) window
d) subquery
Title: A __ provides a "window" to see some of the database data.
Difficulty: Medium
Section Reference 1: 23.2 Queries
15) Based on the following table, the query that gets the names and complete mailing addresses of all customers is ____________________.
Customer table
Customer_Number | Name | Address | City | State | Zip |
3175 | Sam’s Small Appliances | 100 Main Street | Anytown | CA | 98765 |
3176 | Electronics Unlimited | 175 Liberty Ave | Pleasantville | MI | 45066 |
a) SELECT * FROM Customer
b) SELECT Name, Address, City, State, Zip INTO Customer
c) SELECT FROM Customer FIELDS Name, Address, City, State, Zip
d) SELECT Name, Address, City, State, Zip FROM Customer
Title: Query that gets all mailing addresses.
Difficulty: Easy
Section Reference 1: 23.2 Queries
16) Based on the table below, the query that finds all customers who do not live in Pleasantville is _________________.
Customer table
Customer_Number | Name | Address | City | State | Zip |
3175 | Sam’s Small Appliances | 100 Main Street | Anytown | CA | 98765 |
3176 | Electronics Unlimited | 175 Liberty Ave | Pleasantville | MI | 45066 |
a) SELECT * FROM Customer WHERE City NOT 'Pleasantville'
b) SELECT * FROM Customer WHERE NOT (City = 'Pleasantville')
c) SELECT * FROM Customer WHERE City <> 'Pleasantville'
d) SELECT * FROM Customer WHERE City != 'Pleasantville'
Title: Query to find the customers who don't live in Pleasantville.
Difficulty: Easy
Section Reference 1: 23.2 Queries
17) Based on the table below, the query that finds the names and zip codes of all customers is _____________________.
Customer table
Customer_Number | Name | Address | City | State | Zip |
3175 | Sam’s Small Appliances | 100 Main Street | Anytown | CA | 98765 |
3176 | Electronics Unlimited | 175 Liberty Ave | Pleasantville | MI | 45066 |
a) SELECT ALL Name, Zip FROM Customer
b) SELECT Name, Zip
c) SELECT * FROM Customer
d) SELECT Name, Zip FROM Customer
Title: Query that finds the names and zip codes of all customers.
Difficulty: Easy
Section Reference 1: 23.2 Queries
18) Based on the table below, insert the statement that queries the database for the names of customers who live in the city of Pleasantville: ______________________
Customer table
Customer_Number | Name | Address | City | State | Zip |
3175 | Sam’s Small Appliances | 100 Main Street | Anytown | CA | 98765 |
3176 | Electronics Unlimited | 175 Liberty Ave | Pleasantville | MI | 45066 |
a) SELECT Name FROM Customer WHERE City 'Pleasantville'
b) SELECT Name FROM Customer WHERE City == 'Pleasantville'
c) SELECT Name FROM Customer WHERE City >< 'Pleasantville'
d) SELECT Name FROM Customer WHERE City = 'Pleasantville'
Title: Query to find the customers in Pleasantville.
Difficulty: Easy
Section Reference 1: 23.2 Queries
19) In SQL, ____ is used to test for equality.
a) EQUAL
b) ==
c) =
d) EQUALS
Title: In SQL, ____ is used to test for equality.
Difficulty: Easy
Section Reference 1: 23.2 Queries
20) Based on the table below, which of the following statements will return the number of customers in Michigan (MI)?
Customer table
Customer_Number | Name | Address | City | State | Zip |
3175 | Sam’s Small Appliances | 100 Main Street | Anytown | CA | 98765 |
3176 | Electronics Unlimited | 175 Liberty Ave | Pleasantville | MI | 45066 |
3177 | ABC Limited | 1034 Laurelton | Clarkstown | MI | 45066 |
Title: Which query returns the number of Michigan customers?
Difficulty: Easy
Section Reference 1: 23.2 Queries
21) The outcome of a SELECT query is a _________ that you can view and analyze.
a) table
b) list
c) result set
d) subquery
Title: The outcome of a SELECT query is a ___.
Difficulty: Easy
Section Reference 1: 23.2 Queries
22) Which SQL command(s) modify the data in a database?
I SELECT
II INSERT
III DELETE
IV UPDATE
a) I, II, III
b) II, III
c) II, III, IV
d) III, IV
Title: Which SQL command(s) modify the data in a database?
Difficulty: Easy
Section Reference 1: 23.2 Queries
23) Based on the table below, the SQL statement that changes the address and city of customer 3175, Gregory Adams, to 1337 Parkway Ave and Pembrook, SD, 57462, respectively, is _____________________.
Customer table
Customer_Number | FirstName | LastName | Address | City | State | Zip |
3175 | Gregory | Adams | 100 Main Street | Anytown | CA | 98765 |
3176 | Lincoln | Hall | 1175 Liberty Ave | Pleasantville | MI | 45066 |
a)
UPDATE Customer Address = '1337 Parkway Ave', City = 'Pembrook', State = 'SD', Zip = '57462' WHERE FirstName = 'Gregory' AND LastName = 'Adams'
b)
UPDATE Customer SET Address = '1337 Parkway Ave', City = 'Pembrook', State = 'SD', Zip = '57462' WHERE FirstName = 'Gregory' AND LastName = 'Adams'
c)
UPDATE Customer SET Address = '1337 Parkway Ave', City = 'Pembrook', State = 'SD', Zip = '57462' WHERE Name = 'Gregory Adams'
d)
UPDATE Customer SET Address = '1337 Parkway Ave', City = 'Pembrook', State = 'SD', Zip = '57462'
Title: Give SQL statement to change customer address.
Difficulty: Easy
Section Reference 1: 23.2 Queries
24) Based on the table below, the SQL statement that changes the last name of customer 3175 to Michael is _____________________.
Customer table
Customer_Number | FirstName | LastName | Address | City | State | Zip |
3175 | Susan | Adams | 100 Main Street | Anytown | CA | 98765 |
3176 | Lincoln | Hall | 1175 Liberty Ave | Pleasantville | MI | 45066 |
a) UPDATE Customer SET LastName = 'Michael' WHERE Customer_Number = 3175
b) UPDATE Customer SET Customer_Number = 3175 WHERE LastName = 'Michael'
c) UPDATE Customer table SET LastName = 'Michael' WHERE Customer_Number = 3175
d) UPDATE Customer SET FirstName = 'Susan' WHERE LastName = 'Michael'
Title: Change last name of customer.
Difficulty: Easy
Section Reference 1: 23.2 Queries
25) In a Java program, the result of a SQL query is returned in a(n) _____________ object.
a) ResultSet
b) connection
c) view
d) driver
Title: The result of a SQL query is returned in a ___ object.
Difficulty: Easy
Section Reference 1: 23.4 Database Programming in Java
26) A ______________ object can create statement objects that are used to execute SQL commands.
a) ResultSet
b) Connection
c) JDBC
d) Driver
Title: A ___ object can create statement objects.
Difficulty: Easy
Section Reference 1: 23.4 Database Programming in Java
27) An example of a lightweight database is:
a) Oracle
b) MS Access
c) Apache Derby
d) MySQL
Title: An example of a lightweight database is.
Difficulty: Easy
Section Reference 1: 23.3 Installing a Database
28) The acronym JDBC stands for ________:
a) Joint Data Base Center
b) Java Database Control
c) Joint Database Connectivity
d) Java Database Connectivity
Title: The acronym JDBC stands for____.
Difficulty: Easy
Section Reference 1: 23.3 Installing a Database
29) All database URLs have the format:
a) jdbc:subprotocol:driver-specific data
b) jdbc/subprotocol/driver/data
c) oracle.jdbc.driver.OracleDriver
d) c:\jdk1.7.0\db\lib\driver.jar
Title: All database URLs have the format.
Difficulty: Medium
Section Reference 1: 23.3 Installing a Database
30) What should the database.properties file contain so you can connect to a database?
a) a database URL, user name, password
b) a database URL, the program name, and a JDBC driver
c) a database URL, the program name, and database name
d) the JDBC driver path
Title: What should the database.properties file contain?
Difficulty: Medium
Section Reference 1: 23.3 Installing a Database
31) The following command will compile a Java program called TestDB:
a) java TestDB.class
b) java TestDB.java
c) javac TestDB.java
d) javac TestDB.class
Title: The following command will compile a java program called TestDB.
Difficulty: Easy
Section Reference 1: 23.3 Installing a Database
32) What should be on the class path when you launch a Java program that accesses a database?
a) the JDBC driver
b) the derby.jar file
c) the user name and password
d) the JDK
Title: What should be on the class path when you launch a program that accesses a database?
Difficulty: Medium
Section Reference 1: 23.3 Installing a Database
33) If you encounter an error during updating a transaction, then call the ______ method:
a) undo
b) takeback
c) rollaround
d) rollback
Title: you encounter an error during updating a transaction, then call the ______ method.
Difficulty: Easy
Section Reference 1: 23.5 Application: Entering an Invoice
34) When you execute a rollback:
a) the temporary data are made permanent.
b) the temporary tables are simply discarded.
c) the database stores the changes in a temporary table.
d) it will commit all the updates.
Title: When you execute a rollback.
Difficulty: medium Section Reference 1: 23.5 Application: Entering an Invoice
35) What statement will return the value of a given key from the configuration file? Assume props is of type Properties.
a) String driver = props.getProperty("database.properties");
b) Connection conn = SimpleDataSource.getProperty("database.properties");
c) String driver = props.getProperty("jdbc.driver");
d) Properties props = SampleDataSource.init("jdbc.driver");
Title: What statement will return the value for a given key from the configuration file? Difficulty: medium Section Reference 1: 23.3 Installing a Database
36) If your statement has variable parts, you should use a _________ object.
a) ResultSet
b) ResultSetMetaData
c) PreparedStatement
d) Statement
Title: If your statement has variable parts, you should use a _________.
Difficulty: Medium
Section Reference 1: 23.4 Database Programming in Java
37) What is one reason why you need a finally clause after a try/catch sequence that accesses a database?
a) To commit the changes
b) To display the ResultSet
c) To display the metadata
d) To close the connection
Title: What is one reason why you need a finally clause?
Difficulty: Medium
Section Reference 1: 23.4 Database Programming in Java
38) Given the following two statements, what does the call to the next() method return?
ResultSet result = statement.executeQuery();
result.next();
a) The next record in the result.
b) true or false.
c) The primary key.
d) The next column in the table.
Title: Given the following two statements, what does the next() method return?
Difficulty: Medium
Section Reference 1: 23.5 Application: Entering an Invoice
39) Which Java statement connects to a database using a Connection object?
a) Connection conn = new Connection(url, username, password);
b) Conenction conn = DriverManager.getConnection();
c) Connection conn = DriverManager.connect(url, username, password);
d) Connection conn = DriverManager.getConnection(url, username, password);
Title: Which Java statement connects to a database using a Connection object?
Difficulty: Medium
Section Reference 1: 23.4 Database Programming in Java
40) The ___ symbol in the query string denotes variables that you fill in when you make an actual query
a) ?
b) *
c) !
d) ::
Title: The ___ symbol in the query string denotes variables filled by an actual queryDifficulty: Easy
Section Reference 1: 23.4 Database Programming in Java
41) When you first get a result set from the executeQuery method, you need to call ____ to move to the first row
a) first()
b) start()
c) move()
d) next()
Title: When you first get a result set, you need to call ____ to move to the first row.
Difficulty: Medium
Section Reference 1: 23.4 Database Programming in Java
42) What is the effect of the following statement?
String product_code = result.getString(1);
a) it will return the data in the second column.
b) it will return the data in the first column.
c) it will store the integer 1 as a string in the product_code.
d) it will return the name of the column.
Title: What is the effect of the following statement?
Difficulty: Easy
Section Reference 1: 23.4 Database Programming in Java
43) If you want to find out about properties of a result set from an unknown table, you need to use:
a) the ResultSet class.
b) the Statement class.
c) the ResultSetData class.
d) the ResultSetMetaData class.
Title: If you want to find out about properties of a result set, you need to use___.
Difficulty: Easy
Section Reference 1: 23.4 Database Programming in Java
44) What will the following command do?
java –classpath derby.sql;. ExecSQL database.properties Product.sql
a) It will execute the statements in the database.properties file.
b) It will execute the statements in the derby.sql file.
c) It will execute the statements in the Product.sql file.
d) It will act as an interactive testing tool only.
Title: What will the following command do?
Difficulty: Hard
Section Reference 1: 23.4 Database Programming in Java
45) What will the following command do?
java –classpath derby.sql;. ExecSQL database.properties
a) It will execute the statements in the database.properties file.
b) It will execute the statements in the derby.sql file.
c) It will compile the statements in the derby.sql file.
d) It will use ExecSQL program as an interactive testing tool.
Title: What will the following command do?
Difficulty: Hard
Section Reference 1: 23.4 Database Programming in Java
46) One of the steps for testing the JDBC driver is:
a) to setup your user account.
b) to find the name of the database URL that your driver expects.
c) to install the JDBC driver program.
d) to change the directory to the JDBC driver directory.
Title: One of the steps for testing the JDBC driver?
Difficulty: Medium
Section Reference 1: 23.3 Installing a Database
47) Oracle is an example of a:
a) Heavyweight Java database.
b) Lightweight Java database.
c) Desktop database.
d) Production-quality database.
Title: Oracle is an example of?
Difficulty: Easy
Section Reference 1: 23.3 Installing a Database
48) Microsoft Access is an example of a:
a) Heavyweight Java database.
b) Lightweight Java database.
c) Desktop database.
d) Production-quality database.
Title: MS Access is an example of?
Difficulty: Easy
Section Reference 1: 23.3 Installing a Database
49) Apache Derby is an example of a:
a) Heavyweight Java database.
b) Lightweight Java database.
c) Desktop database.
d) Production-quality database.
Title: Apache Derby is an example of?
Difficulty: Easy
Section Reference 1: 23.3 Installing a Database
50) An example of a production-quality database is:
a) Oracle
b) MS Access
c) Apache Derby
d) Powerbuilder
Title: An example of a Production-quality database is.
Difficulty: Easy
Section Reference 1: 23.3 Installing a Database
51) An example of a desktop database is:
a) Oracle
b) MS Access
c) Apache Derby
d) MySQL
Title: An example of a lightweight database is.
Difficulty: Easy
Section Reference 1: 23.3 Installing a Database
52) You can use the generic ____ method to execute arbitrary SQL statements.
a) setString()
b) prepareStatement()
c) executeQuery()
d) execute()
Title: You can use the generic ____ method to execute arbitrary SQL statement.
Difficulty: Medium
Section Reference 1: 23.4 Database Programming in Java
53) What does the execute method return?
a) ResultSet
b) Query
c) RecordSet
d) boolean
Title: What does the execute method return?
Difficulty: Easy
Section Reference 1: 23.4 Database Programming in Java
54) What is wrong with the following statement?
boolean result = statement.execute("SELECT * from emp WHERE empNum = '?'");
a) boolean should be ResultSet
b) execute should be executeQuery
c) execute should be prepareStatement
d) ? should be an integer
Title: What is wrong with the following statement?
Difficulty: Hard
Section Reference 1: 23.4 Database Programming in Java
55) What is wrong with the following statement?
ResultSet result = statement.execute("SELECT * from emp WHERE empNum = '5'");
a) ResultSet should be String
b) execute should be executeQuery
c) execute should be prepareStatement
d) 5 should not be used as an empNum value
Title: What is wrong with the following statement?
Difficulty: Medium
Section Reference 1: 23.4 Database Programming in Java
56) If your program needs to look at several result sets at the same time, _____.
a) you need to create multiple Statement objects.
b) you can reuse the Statement or PreparedStatement objects
c) you should close the ResultSet before creating a new one.
d) you are not able to see several sets at the same time.
Title: If your program needs to look at several results sets at the same time?
Difficulty: Medium
Section Reference 1: 23.4 Database Programming in Java
57) When you are done with a Statement object, _______.
a) you should close it and you must close the associated result set as well.
b) you should not close it and should not close the associated result set.
c) you should close it and that automatically closes the associated result set.
d) you should only close the associated result set.
Title: What to do when you are done with the Statement objectDifficulty: Medium
Section Reference 1: 23.4 Database Programming in Java
58) When you close a connection:
a) it closes the connection only.
b) it closes the connection and the associated result set.
c) it closes the connection and the associated statement.
d) it closes the connection and closes all statements and result sets.
Title: What happens when you close a connection.
Difficulty: Medium
Section Reference 1: 23.4 Database Programming in Java
59) A ______ lets you fetch a query result, one row at a time.
a) Query
b) Statement
c) ResultSet
d) PreparedStatement
Title: A ______ lets you fetch the query result, one row at a time.
Difficulty: Medium
Section Reference 1: 23.4 Database Programming in Java
60) The ______ class has a next method to visit the next row of a query result.
a) Scanner
b) Statement
c) ResultSet
d) Connection
Title: The ______ class has a next method to visit the next row of a query result.
Difficulty: Medium
Section Reference 1: 23.4 Database Programming in Java
61) To fetch a column in a result set that stores the number of children, use the ______ method.
a) nextInt()
b) getInt()
c) nextDouble()
d) getDouble()
Title: To fetch a column that stores number of children, use the ______ method.
Difficulty: Medium
Section Reference 1: 23.4 Database Programming in Java
62) To fetch a column in a result set that stores prices, use the ______ method.
a) nextInt()
b) getInt()
c) nextDouble()
d) getDouble()
Title: To fetch a column that stores prices, use the ______ method.
Difficulty: Medium
Section Reference 1: 23.4 Database Programming in Java
63) Metadata are ______
a) data about an object.
b) the properties of a result set.
c) the objects that are used to execute the SQL commands.
d) data about a connection.
Title: Meta data are ______.
Difficulty: Easy
Section Reference 1: 23.4 Database Programming in Java
64) To get the number of columns in a result set, you use _________ method of the ResultSetMetaData class.
a) getColumnInt()
b) getColumnsCount()
c) getCount()
d) getColumnCount()
Title: To get the number of columns, you will use _________ method:
Difficulty: Medium
Section Reference 1: 23.4 Database Programming in Java
65) In jdbc.URL, the acronym URL stands for:
a) Universal Resource Locator
b) Uniform Resource Locator
c) Universe Resultset Locator
d) Uniform Resultset Locator
Title: The acronym URL in jdbc.URL stands for what?
Difficulty: Easy
Section Reference 1: 23.3 Installing a Database
66) Beginners are afraid of issuing complex SQL queries, so they are ______
a) throwing away a major benefit of a relational database.
b) throwing an exception called badQueryException.
c) doing the right thing by avoiding those queries for efficiency.
d) taking advantage of the SQL benefits.
Title: Beginners are afraid of issuing complex SQL queries, so they are _____.
Difficulty: Easy
Section Reference 1: 23.4 Database Programming in Java
67) "SQL injection attacks" have been responsible for many cases of data theft. One of the solutions is:
a) Never use double quotes in the query.
b) Never use single quotes in the query.
c) Never add a string to a query that you didn't type yourself.
d) Never add a number to a query that you didn't type yourself.
Title: "SQL injection attacks" have been responsible for many cases of data theft.
Difficulty: Medium
Section Reference 1: 23.4 Database Programming in Java
68) What does the following statement do?
String prodCode = nextLine(in, "Product Code (D=Done, L=List)");
a) It will store the string "Product Code (D=Done, L=List)" in the variable in.
b) It will display "in, Product Code (D=Done, L=List)" on the screen.
c) It will display the contents of the variable in on the screen.
d) It will read the user's input and store it in the object prodCode.
Title: What does the following statement do?
Difficulty: Medium
Section Reference 1: 23.4 Database Programming in Java
69) Which import statement will allow you to use a SQLException object?
a) import javax.swing.SQLException;
b) import java.sql.SQLException;
c) import java.util.SQLException;
d) import java.io.SQLException;
Title: Which import statement will allow you to use a SQLException object?
Difficulty: Medium
Section Reference 1: 23.4 Database Programming in Java
70) Database tables store rows that contain the following except
a) strings
b) fundamental data types
c) arbitrary objects
d) numbers
Title: Database tables store rows that contain the following exceptDifficulty: Medium
Section Reference 1: 23.4 Database Programming in Java
71) The ______ clause is used to select data that fulfill a condition
a) SELECT
b) FROM
c) WHEN
d) WHERE
Title: The ______ clause selects data that fulfill a condition.
Difficulty: Easy
Section Reference 1: 23.2 Queries
72) Used with the LIKE operator, the ______ symbol matches exactly one character.
a) _
b) %
c) ?
d) $
Title: Used with the LIKE operator, the ______ symbol matches exactly one character.
Difficulty: Easy
Section Reference 1: 23.2 Queries
73) What will the following expression match to?
Name LIKE '_e%'
a) all strings in the Name column that end with "e".
b) all strings in the Name column whose second to last letter is an "e".
c) all strings in the Name column that start with the letter "e".
d) all strings in the Name column whose second letter is an "e".
Title: What will the following expression match to?
Difficulty: Medium
Section Reference 1: 23.2 Queries
74) What will the following expression match to?
Name LIKE 'e_%'
a) all strings in the Name column that have at least 3 characters.
b) all strings in the Name column whose first letter is an "e".
c) all strings in the Name column that start with the letter "e" and end with underscore.
d) all strings in the Name column whose second letter is any character.
Title: The following expression.
Difficulty: Medium
Section Reference 1: 23.2 Queries
75) What will the following expression match to?
Name LIKE '%e%'
a) all strings in the Name column that end with "e".
b) all strings in the Name column whose second to last letter is an "e".
c) all strings in the Name column that contain the letter "e".
d) all strings in the Name column whose second letter is an "e".
Title: What will the following expression match to?
Difficulty: Medium
Section Reference 1: 23.2 Queries