WGU C170 EXAM WITH COMPLETE SOLUTIONS 100%
VERIFIED 2025-2026!!
What else does the manager need to have to create this view? - ANSWER>>The
SELECT privilege for each column referenced elsewhere in the statement
Consider the following SQL statement.
SELECT product_name, product_number, mfg_city FROM product;
Which one of the following statements, if placed before this statement, creates a view? -
ANSWER>>CREATE VIEW viewprod AS
What is the appropriate statement to alter a view? - ANSWER>>ALTER VIEW
Consider the following statement.
DROP VIEW EMPLOYEE;
What would be the outcome of executing this statement to the HRDB table from which
the view named EMPLOYEE was created? - ANSWER>> The view is removed.
Use the following index table figure.
Salesperson Table
Record Salesperson Salesperson City HireDate Commission
Address Number Name 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%
Exercise
The database administrator wants to create an index that will make the retrieval of data
by city faster. The database is set to use 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' (citycity)
What is the name of the special internal database where the query optimizer finds
information? - ANSWER>>Relational catalog
Which clause in a CREATE TABLE statement creates an index on a field? -
ANSWER>>INDEX index_name (index_columns)
This would be an example of changing an index on the CUSTOMER table named the
IDX_NAME because there are multiple customers with the same name. It has been
determined that it would be desirable to modify this index to include the telephone
number.
Which, if any, of the following command lines will change the index named IDX_NAME on
the CUSTOMER table to include both NAME and TELEPHONE as part of the index? -
, ANSWER>>ALTER INDEX IDX_NAME ON CUSTOMER(NAME, TELEPHONE);
Which of the following shows the correct syntax for dropping a primary key of a table by
using the DROP INDEX command? - ANSWER>>DROP INDEX PRIMARYPRIMARY ON
tbl_name ;
If a product is deleted from the product table, then all the related rows for the product in
the pricing table are automatically deleted too.
What is this referential integrity technique known as? - ANSWER>>Cascaded delete
Refer to the text below.
CREATE TABLE 'test1' (
contact_id INT(10),
name VARCHAR(10),
event_id INT(5),
Which of the following should be added onto the end to make the event_id attribute the
primary key within the CREATE TABLE statement? - ANSWER>>PRIMARY KEY
(event_id));
What does the clause PRIMARY KEY followed by a field name in parentheses mean in a
CREATE TABLE statement? - ANSWER>>The column - in parentheses is the primary
key for the table.
Which of the following statements should be used so that it assigns a foreign key to the
customer name? - ANSWER>>FOREIGN KEY ( customer_name ) REFERENCES
table_name ( customer_name )
Which of the following creates a foreign-key constraint on the child table? -
VERIFIED 2025-2026!!
What else does the manager need to have to create this view? - ANSWER>>The
SELECT privilege for each column referenced elsewhere in the statement
Consider the following SQL statement.
SELECT product_name, product_number, mfg_city FROM product;
Which one of the following statements, if placed before this statement, creates a view? -
ANSWER>>CREATE VIEW viewprod AS
What is the appropriate statement to alter a view? - ANSWER>>ALTER VIEW
Consider the following statement.
DROP VIEW EMPLOYEE;
What would be the outcome of executing this statement to the HRDB table from which
the view named EMPLOYEE was created? - ANSWER>> The view is removed.
Use the following index table figure.
Salesperson Table
Record Salesperson Salesperson City HireDate Commission
Address Number Name 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%
Exercise
The database administrator wants to create an index that will make the retrieval of data
by city faster. The database is set to use 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' (citycity)
What is the name of the special internal database where the query optimizer finds
information? - ANSWER>>Relational catalog
Which clause in a CREATE TABLE statement creates an index on a field? -
ANSWER>>INDEX index_name (index_columns)
This would be an example of changing an index on the CUSTOMER table named the
IDX_NAME because there are multiple customers with the same name. It has been
determined that it would be desirable to modify this index to include the telephone
number.
Which, if any, of the following command lines will change the index named IDX_NAME on
the CUSTOMER table to include both NAME and TELEPHONE as part of the index? -
, ANSWER>>ALTER INDEX IDX_NAME ON CUSTOMER(NAME, TELEPHONE);
Which of the following shows the correct syntax for dropping a primary key of a table by
using the DROP INDEX command? - ANSWER>>DROP INDEX PRIMARYPRIMARY ON
tbl_name ;
If a product is deleted from the product table, then all the related rows for the product in
the pricing table are automatically deleted too.
What is this referential integrity technique known as? - ANSWER>>Cascaded delete
Refer to the text below.
CREATE TABLE 'test1' (
contact_id INT(10),
name VARCHAR(10),
event_id INT(5),
Which of the following should be added onto the end to make the event_id attribute the
primary key within the CREATE TABLE statement? - ANSWER>>PRIMARY KEY
(event_id));
What does the clause PRIMARY KEY followed by a field name in parentheses mean in a
CREATE TABLE statement? - ANSWER>>The column - in parentheses is the primary
key for the table.
Which of the following statements should be used so that it assigns a foreign key to the
customer name? - ANSWER>>FOREIGN KEY ( customer_name ) REFERENCES
table_name ( customer_name )
Which of the following creates a foreign-key constraint on the child table? -