Oracle Database MySQL 5.6 Developer — Question 23
Which two statements provide the definition for a view named view1 in the test database?
Answer options
- A. SHOW CREATE VIEW view1 FROM test
- B. SHOW CREATE VIEW test-view1
- C. SELECT VIEW_DEFINITION_SCHEMA.VIEWS FROM INFORMATION _SCHEMA.VIEWS WHERE TABLE_NAME="view1" AND TABLE_SCHEMA = "test"
- D. SELECT DEFINITION FROM INFORMATION_SCHEMA.VIEWS WHERE NAME = "test"
- E. SHOW DEFINITION FOR test.view
Correct answer: A, C
Explanation
The correct options, A and C, are directly related to retrieving the definition of the view named view1 from the specified database. Option A uses the SHOW CREATE VIEW command correctly, while option C utilizes a SELECT statement from the INFORMATION_SCHEMA to get the view definition. The other options either reference incorrect view names, schemas, or commands that do not provide the necessary definition for view1.