Complete the code to drop a view named 'employee_view'.
DROP VIEW [1];The correct syntax to drop a view is DROP VIEW view_name;. Here, the view name is employee_view.
Complete the code to rename a view from 'old_view' to 'new_view'.
RENAME TABLE [1] TO [2];
In MySQL, views can be renamed using RENAME TABLE old_view TO new_view; because views are treated like tables in this command.
Fix the error in the code to modify the view 'sales_view' to select only 'product' and 'amount'.
CREATE OR REPLACE VIEW sales_view AS SELECT [1] FROM sales;The SELECT statement must list columns separated by commas. So, product, amount is correct.
Fill both blanks to drop a view only if it exists, named 'customer_view'.
DROP VIEW [1] IF [2] EXISTS customer_view;
The correct syntax is DROP VIEW IF EXISTS view_name;. The words must be in this order.
Fill all three blanks to alter the view 'order_view' to select 'order_id' and 'order_date' from 'orders' table.
CREATE [1] REPLACE VIEW [2] AS SELECT [3] FROM orders;
The syntax to modify a view is CREATE OR REPLACE VIEW view_name AS SELECT columns FROM table;.