MySQL Views
- A view can refer to multiple tables via __________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
In MySQL, a ‘View’ can refer to multiple tables. This makes it a lot simpler to execute the queries involving joins. When a selection is made from the view, the join is executed producing the results.
- What is abc in the following statement?
CREATE VIEW xyz (abc) AS SELECT a FROM t;
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
Column names for a view can be explicitly provided in the ‘CREATE VIEW’ clause itself. It presents the table view with the aliased column names instead of the original column names.
- What is xyz in the following statement?
CREATE VIEW xyz AS SELECT a, b FROM t;
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
A ‘View’ is created in MySQL by writing the clause ‘CREATE VIEW’ followed by the view name. Then follows the list of column names of the table that are to be presented as the view.
- A View can be used to select a subset of the table columns.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
In MySQL, a ‘View’ is used to present a table in the database. It is a virtual table. It is also used to present a subset of the columns that are present in the original table of the database.
- Which of these is also known as a virtual table?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
In MySQL, a ‘View’ is also called a virtual table. It does not contain any data but only appears as a table. It is an alternative way to show or describe a table similar to the original table.