SQL Query
DAS allows you to easily run various SQL statements in a graphical SQL window and to perform operations on databases, such as adding, deleting, editing, and viewing a database.
Precautions
- After a database is created, you need to create a schema before performing any SQL operations.
- SQL operations are performed on tables and views in a database.
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 SQL Operations > SQL Query.
- Check whether there are any schemas other than system schemas.
- If yes, go to 8.
- If not, create one by referring to Creating a Schema. Then, go to 8.
- In the navigation tree on the left of the SQL window, select a table or view.
Figure 1 SQL window
You can perform the operations listed in Table 1 in the SQL window.
Table 1 Function description Function
Description
Execute SQL
Executes SQL statements.
SQL operations are performed on tables and views in a database.
Format SQL
Improves readability of SQL statements. Formatting SQL statements enables statements to be displayed in line break mode, but does not change their logics and semantics.
SQL formatting takes effect for all the SQL statements in the SQL window. You cannot format only one selected statement.
Execute SQL Plan
Reports execution of SQL statements to make troubleshooting easy and optimize SQL processing performance.
SQL Favorites
Allows you to add, view, and manage frequently-used SQL statements.
Save Executed SQL Statements
Saves the recently executed SQL statements to the server.
SQL Input Prompt
Helps you quickly enter a specific database, table, or field name when you enter a SQL statement in the SQL window.
Full Screen
Shows SQL statements on a full screen.
Executed SQL Statements
Shows SQL execution details.
Messages
Shows the SQL execution output.
Result Set
Shows SQL execution results.
Allows you to view details about a single row, add a row, submit for editing, delete a row, export a row, copy a row, copy a column, set a column, and more.
Overwrite/Append Mode
- Append Mode: Each time a SQL statement is executed, the new result set is appended to the previous one.
- Overwrite Mode: Each time a SQL statement is executed, the new result set overwrites the previous one.
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