First, the View
A view is a virtual table (not a real one), which is the essence of getting dynamic datasets and naming them based on SQL statements. Users can only use "name" to get a result set and use it as a table.
Select * from (Selectfromwhere course_id=3) as where>
temporary table Search
1. Create a View
-- Syntax: -- CREATE VIEW name SQL statement createviewasselect from where course_id=3
Create an instance
2. Delete View
-- Syntax: -- frop View name dropView v1
Delete View V1
3. Modify the View
-- Syntax: -- ALTER VIEW name as SQL statement alterviewasselectfrom where course_id =1
Modify View v1
4. Using views
When you use a view, you manipulate it as a table, and because the view is a virtual table, you cannot use it to create, update, and delete real tables, only for queries.
Select * from V1
working with views v1Second, Trigger
Before and after an "Add/delete/change" operation on a table you can use triggers when you want to trigger a particular behavior, which is used to customize the behavior of the user before and after the "Add/delete/change" row of the table.
1. Create basic syntax
MySQL Basics (ii)