Creating a View
This section describes how to create a view on the DAS console.
Procedure
- Log in to the DAS console.
- Click in the upper left corner and select a region and project.
- Click in the upper left corner, and under Databases, click Data Admin Service.
- In the navigation pane on the left, choose Development Tool.
You can also click Go to Development Tool on the overview page.
- Locate the DB instance that you want to log in to and click Log In in the Operation column.
- On the top menu bar, choose Database Management.
- Click Change on the right of the current database to switch to the database where you want to create a view.
Figure 1 Switching to another database
- On the Objects tab page, choose Views.
- Click Create View.
Figure 2 Creating a view
- On the displayed page, specify information such as view name, security, check option, and algorithm from drop-down lists as required, and click Create.
Figure 3 Creating a view
Table 1 Parameter description Parameter
Description
View Name
(Mandatory) Enter a view name.
Definer
Enter a definer.
Algorithm
(Optional) You can leave this parameter blank or set it to MERGE, TEMPTABLE, or UNDEFINED.
- UNDEFINED: The required algorithm is automatically selected.
- MERGE: A combination algorithm. Executing this algorithm will combine and execute SQL statements of the view and those of the external query view.
- EMPTABLE: The result is stored in a temporary table for query.
Security
(Optional) You can leave this parameter blank or set it to DEFINER or INVOKER.
- DEFINER: When the view is executed, the user account specified by DEFINER will be used to check access privileges for the view.
- INVOKER: When the view is executed, the user account specified by INVOKER will be used to check access privileges for the view.
Check Option
(Optional) You can leave this parameter blank or set it to LOCAL or CASCADED.
- If you select CASCADED for Check Option, the view that the current view depends on will also have the check option.
- If you select LOCAL for Check Option, the system checks whether the view that the current view depends on has check options. If yes, the system checks the view that the current view depends on. If no, the system does not check the view.
View Definition Statement
Enter a SQL statement for creating the view. You only need to enter the SELECT part.
- In the dialog box, confirm the SQL scripts.
- If the information is correct, click Execute.
- If you need to modify the information, click Back.
- Check whether that the created view appears in the view list.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot