What do the parentheses denote? - ...ANSWER...The column
values for two individual rows
What happens in an UPDATE statement if the WHERE
clause is
... [Show More] omitted? - ...ANSWER...Every row in the table is
updated
Which action deletes all rows from a table? -
...ANSWER...Omitting the WHERE clause from a DELETE
statement
What is the purpose of using a SELECT statement? -
...ANSWER...To retrieve data
Which SQL statement retrieves all of the columns from the
Owners table? - ...ANSWER...SELECT * FROM Owners;
Which SQL statement tallies the number of different cities in
which record companies have been founded? -
...ANSWER...SELECT COUNT(DISTINCT city) FROM
recordcompany;
Which task does ORDER BY perform by default? -
...ANSWER...Sorting rows in ascending order
A database administrator of a movie rental company needs to
compile a list of movies released each year for a marketing
campaign.
Which SQL command will accomplish this? -
...ANSWER...SELECT YEAR, TITLE FROM MOVIE
GROUP BY YEAR;
A database manager plans to create a view of a table and has
these two elements:
• The CREATE VIEW privilege for the table
• A level of privilege for every column selected by the
SELECT
What else does the manager need to create this view? -
...ANSWER...The SELECT privilege for every column
referred to elsewhere in the statement
Refer to the given SQL statement.
SELECT product_name, product_number, mfg_city FROM
product;
Which statement, when added before this statement, generates
a view? - ...ANSWER...CREATE VIEW viewprod AS
What is the proper command to change a view? -
...ANSWER...ALTER VIEW
Refer to the given statement.
DROP VIEW EMPLOYEE;
What happens as a result of the execution of this statement to
the HRDB table on which the EMPLOYEE view is based? -
...ANSWER...The view is discarded.
How does Table 2 affect the returned results from Table 1 in a
left join? - ...ANSWER...All Table 1 results are returned,
regardless of whether a match is found in Table 2.
Which command functions as a RIGHT JOIN with the roles
of the tables reversed? - ...ANSWER...LEFT JOIN
Refer to the given SQL statement.
SELECT t1.*, t2.* FROM t1 LEFT JOIN t2 ON t1.i1 = t2.i2
What does the LEFT JOIN statement do? - ...ANSWER...It
selects all of the rows in Table 1 and the matching rows in
Table 2.
What is the difference between COUNT(*) and
COUNT(col_name) for specified column names? -
...ANSWER...COUNT(*) counts every row selected, and
COUNT(col_name) counts only non-null values.
Which function determines the total value for a column? -
...ANSWER...SUM()
How does a row subquery differ from a table subquery? -
...ANSWER...A row subquery returns a single row of one or
more values.
Refer to the given SQL statement.
1. SELECT SPNAME
2. FROM SALESPERSON
3. WHERE SPNUM=
4. FROM CUSTOMER
5. WHERE CUSTNUM=20900);
What is missing from the subquery at the beginning of line 4?
- ...ANSWER...(SELECT SPNUM
Refer to the diagram of an index table.
Salesperson Table
Record
Address Salesperson
Number Salesperson
Name City
Hire Date
Commission
Rate
1 119 Taylor, A New York 1/21/01 20%
2 137 Baker, B Detroit 2/3/11 10%
3 186 Adams, A Dallas 8/23/96 5%
4 204 Dickens, S Dallas 8/4/12 5%
5 255 Lincoln, J Atlanta 6/7/13 5%
6 361 Carlyle, L Detroit 11/11/10 7%
7 420 Green, C Tucson 9/25/12 11%
8 452 French, F New York 10/23/09 8%
The database administrator has been tasked with
implementing an index to speed up the retrieval of data based
on the city values. The database is using the InnoDB engine.
What is the correct syntax to create an index to be built on the
city field based on the database information? -
...ANSWER...ALTER TABLE `Salesperson` ADD INDEX
'city_index' (`city`)
What is the name of the special internal database where the
query optimizer finds information? - ...ANSWER...Relational
Catalog
A salesperson is authorized to sell many products and a
product can be sold by many salespersons.
Which kind of binary relationship does this scenario describe?
- ...ANSWER...Many-to-many
Which two examples are attributes? - ...ANSWER...An
employee number; A meeting code
Which delete rule sets column values in a child table to a
missing value when the matching data is deleted from the
parent table? - ...ANSWER...Set-to-null [Show Less]