| 1 | SQL console tab | Displays the SQL Console tab currently open for the data source. Click a tab to switch between multiple SQL Consoles. Click the X on the tab to close the corresponding SQL Console. Double-click a tab to rename it, and drag a tab to adjust its position. The context menu supports these actions:- Instance Details: Open the current data source details window.
- Rename Tab: Rename the current tab.
- Duplicate Query: Open a SQL Console for the current data source.
- New Query: Open a new data source SQL Console.
- Close Tab: Close the current tab.
- Close Others: Close all other SQL Consoles except the current one.
- Close Tabs to the Left: Close all SQL Consoles to the left of the current SQL Console.
- Close Tabs to the Right: Close all SQL Consoles to the right of the current SQL Console.
- Close All: Close all SQL Consoles.
|
| 2 | Open data source | Select and open another data source in SQL Console. |
| 3 | Data source information | Displays information about the current SQL Console data source, including the environment, IP address, and port number. |
| 4 | Favorite|Refresh | - Favorite: Click the favorite icon to add the current data source to My Favorites for quick access when opening a new SQL Console.
- Refresh: Refresh the data in the current data source.
|
| 5 | Database name | Select the target database for SQL operations. This is equivalent to the USE statement. |
| 6 | Function | : Execute Execute the selected SQL statement. : SQL Optimize Analyze the SQL statement on the cursor line and provide optimization suggestions. : Format: Format the selected SQL statement for readability. : Execution Plan: View the execution plan of the selected SQL statement. : Favorite this SQL: Save all SQL statements in the current SQL Console to the SQL list for later use. : Favorites: View saved SQL statements. Insert the target SQL with Insert, or use Edit and Delete. : History: View the execution history of SQL on the target data source. Filter execution history by time period or search by keyword, such as SQL statement, database name, or error message. : Settings- Keep Threads (MySQL only): Keep the current SQL Console connected to the data source. Use this for sessions that must persist state, such as session parameters or intermediate query results.
- Results: Choose Overwrite or Append.
- Overwrite (default): The new result set overwrites the previous execution result.
- Append: Open the new result set in a new tab.
- Theme: Change the SQL Console theme. Choose Light or Dark.
- Font Size: Drag the slider to adjust the font size of SQL statements in the SQL Console. Default values:
: View Threads (MySQL, ClickHouse, SQL Server, PostgreSQL, Oracle, OceanBase Oracle): Displays active connections on the current database server and the queries running in those connections. View Threads refresh intervals are 5, 10, 20, or 30 seconds. : Enable Admin Mode|Disable Admin Mode Only Administrator can use this mode. When enabled, SQL executed in SQL Console bypasses standardization and approval flows. : Import Demo Dataset Generate a test dataset in the current data source (only supported in test data sources). : Logical E-R diagram (MySQL and OceanBase MySQL only) View the logical E-R diagram of the current database. : Full Screen Open SQL Console in full-screen browser mode. In full-screen mode, click Exit to restore the original SQL Console size. : AI Diagnosis opens the ChatDBA window in the SQL Console side panel. Use it to retrieve knowledge base content while writing SQL or to view AI diagnosis history.
|
| 7 | Search | Search object names. Select an object type on the left, then search for the corresponding object name on the right. This supports databases, tables, columns, views, functions, stored procedures, triggers, and events. Object search currently supports MySQL, PostgreSQL, Oracle, and DAMENG. For other data sources, enter the table name to quickly locate the target data table. |
| 8 | Database list | Lists all databases and tables in the current data source. Supported functions vary by data source type:MySQL|OceanBase|PolarDB-X|PolarDB MySQL|AnalyticDB MySQL|TDSQL-C MySQL|GaussDB for MySQL|Aurora MySQL|GaiaDB|GaiaDB-X|GreatSQL | MariaDB- Create Database: Right-click any database, click Create Database, enter the Name, Character, and Collation in the dialog, click OK to create a database.
- Convert Schema: Right-click the target table, click Convert Schema to convert the current table's DDL statement into DDL statements for various database types using AI.
- Generate Code: Right-click the target table, click Generate Code to convert the current table structure into code for various programming languages using AI.
- Convert To (AI): Right-click the target stored procedure or function, click Convert To (AI) > Programming Language to convert the current stored procedure or function into code for the target programming language using AI. Supported languages: Java, Python, C#, C++, Golang, Rust, NodeJS.
- Add Table Notes For AI (MySQL only): Right-click the target database, table, or column, and click Add Table Notes For AI to add comments to the target table and fields. For more information, see Chat2SQL.
- Create Table: Right-click the target database or any table in the database, click Create Table to create a data table. For more information, see Designing MySQL Table Structures.
- Alter Table: Right-click the target table, click Alter Table to edit the structure of the target table. For more information, see Designing MySQL Table Structures.
- Create Non-Table Objects: Right-click the target database, select Create Object > Non-Table Object Name to create non-table objects. Supported non-table objects include views, stored procedures, triggers, events, and functions. For more information, see Creating Non-Table Objects in MySQL Visually.
- Manage Non-Table Objects: Right-click the name of the non-table object under the target database to execute operations such as create, edit, rename, copy, and delete for non-table objects. Supported non-table objects include views, stored procedures, triggers, events, and functions.
- Export: Right-click the target database or table, click Export to export the data table in various formats.
- Import: Right-click the target database or table, click Import to import data into the target database table using various methods.
- View Users: Right-click the User at the bottom of the database list, click View Users to view all user information in the current data source.
Oracle|OceanBase Oracle |DaMeng- Convert Schema: Right-click the target table, click Convert Schema to convert the current table's DDL statement into DDL statements for various database types using AI.
- Generate Code: Right-click the target table, click Generate Code to convert the current table structure into code for various programming languages using AI.
- Convert To (AI): Right-click the target function, click Convert To (AI) > Programming Language to convert the current stored procedure or function into code for the target programming language using AI. Supported languages: Java, Python, C#, C++, Golang, Rust, NodeJS.
SQL Server- Convert Schema: Right-click the target table, click Convert Schema to convert the current table's DDL statement into DDL statements for various database types using AI.
- Generate Code: Right-click the target table, click Generate Code to convert the current table structure into code for various programming languages using AI.
- Convert To (AI): Right-click the target stored procedure or function, click Convert To (AI) > Programming Language to convert the current stored procedure or function into code for the target programming language using AI. Supported languages: Java, Python, C#, C++, Golang, Rust, NodeJS.
ClickHousePostgreSQL|Greenplum|Klustron|DWS|openGauss|GaussDB| Vastbase- Create Database: Right-click any database, click Create Database, and enter the required parameters in the dialog, then click OK to create a database.
- Create Schema: Right-click the target database or any schema, click Create Schema to create a schema.
- Edit Schema: Right-click any schema, click Edit Schema to edit a schema.
- Add Table Notes For AI (PostgreSQL, Vastbase): Right-click the target database, table, or column, and click Add Table Notes For AI to add comments to the target table and fields. For more information, see Chat2SQL.
- Create Table (PostgreSQL, Greenplum, Vastbase): Right-click the target database, schema, or any table in the database, then click Create Table to create a data table. For more information, see Designing PostgreSQL Table Structure.
- Alter Table (PostgreSQL, Vastbase): Right-click the target table, then click Alter Table to edit the table structure. For more information, see Designing PostgreSQL Table Structure.
- Create Role: Right-click Login/Group Roles or the target role, click Create Role, enter the required parameters in the dialog, then click OK to create a role.
- Edit Role: Right-click the target role, click Edit Role to edit the role.
TiDB- Create Database: Right-click any database, click Create Database, in the dialog, enter Name, Character, and the corresponding Collation, click OK to create the database.
- Create Table: Right-click the target database or any table in the database, click Create Table to create the table.
- Alter Table: Right-click the target table, click Alter Table to edit the target table structure.
Lindorm- Export: Right-click the target database or table, click Export to export the data table in various formats.
- Import: Right-click the target database or table, click Import to import data into the target database table using various methods.
Common Functions- Database Details or Schema Details: Right-click the target database or Schema, click Database Details or Schema Details to open the Database Details or Schema Details page. View details of the target database (PostgreSQL, KingBase, Klustron, GBase is currently not supported).
- Select Rows: Right-click the target table, click Select Rows to query the data in the table. By default, it returns 100 rows.
- Table Details: Right-click the target table, click Table Details to open the Table Details page. View the Column, Indexes, and Triggers of the target table (GBase is currently not supported).
- Select Rows: Right-click the target view, click Select Rows to query the data in the view. By default, it returns 100 rows.
- Generate DDL: Right-click the target object, click Generate DDL to generate the SQL statement for creating the object (not supported for some object types depending on the data source).
- Duplicate Query: Open a SQL Console for the current data source.
- Refresh: Right-click any object, click Refresh to refresh the database list.
- View Object Details: Hover over the target table name, column name, or index name to display the corresponding detailed information.
|
| 9 | SQL editor | The SQL editor supports these features:- SQL Execution: Supports single statement or batch execution.
- Chat2SQL (MySQL, PostgreSQL, Vastbase): Type / in the editor to enable Chat2SQL mode. Use concise natural language to generate SQL statements. For more information, see Chat2SQL.
- Interrupt execution: Click Stop to stop a running SQL statement.
- Syntax highlighting: Highlights SQL syntax elements in different colors for readability.
- SQL IntelliSense: Displays suggestions based on SQL context as you type.
- View SQL syntax help: Select an SQL keyword, right-click it, and select Help to view help information.
- SQL templates: Use templates for common CREATE, SELECT, INSERT, UPDATE, and DELETE statements. Enter the leading keyword to select the corresponding template. For example, enter CREATE to choose templates such as CREATE TABLE or CREATE VIEW.
- Right-click Menu:
- Execute: Execute the SQL statement at the cursor position.
- Format: Format the selected SQL statement for readability.
- SQL Optimize: Analyze the SQL statement on the cursor line and provide optimization suggestions.
- Execution Plan: View the execution plan of the selected SQL statement.
- Favorite this SQL: Save all SQL statements in the current SQL Console to the SQL list for later use.
- Favorites: View saved SQL statements. Insert the target SQL with Insert, or use Edit and Delete.
- History: View the execution history of SQL on the target data source. Filter execution history by time period or search by keyword, such as SQL statement, database name, or error message.
- View Threads: Displays active connections on the current database server and the queries running in those connections. View Threads refresh intervals are 5, 10, 20, or 30 seconds.
- General operations: Use Cut, Copy, Paste, and Select All.
- Select Current SQL: Select the SQL statement at the cursor position.
- Help: AI analyzes the selected content and explains SQL syntax, target table structure, and overall SQL logic.
|
| 10 | Execution information and result set | Displays execution information and result sets for SQL queries.- Execution information: Displays execution time, executed SQL statement, status, duration, and other details. When an execution error occurs, a AI Diagnosis button appears. Click AI Diagnosis to open the ChatDBA window in the side panel. ChatDBA analyzes the error cause and provides actionable recommendations.
- Result set: Displays the returned SQL query results. Available actions:
Edit Result Set (Conditions: Single table query, includes primary key column or unique key column)- Click Add, Delete, or edit data directly to insert, delete, or update database rows.
- Edit Row: Right-click the target cell, select Edit Row, and edit all fields in the row of the cell.
- Upload File: Right-click the target cell, select Upload File, and upload a file to set the current cell value.
- Paste Row: Right-click the target cell, select Paste Row, and paste copied row information over the current row.
- Paste Field: Right-click the target cell, select Paste Field, and overwrite the current cell with the information from the clipboard.
- Set to Null: Right-click the target cell, select Set to Null, and set the current cell to NULL (only available if the field is not set as NOT NULL).
- Set to Empty String: Right-click the target cell, select Set to Empty String, and set the cell to an empty value.
- Delete Row: Right-click the target cell, select Delete Row, and delete the row containing the current cell.
Common Actions- Click
: Display the result set in column mode. - Click
: Display the result set in row mode. - Click
> Export Result: Export data in various formats. Choose the current page or all data, up to 10,000 rows. - Click
> Create export task: Create a data export task in the current window. The default export scope is the current result set, without switching to the Data Export module. - Click
: Scrolls the result set to the bottom of the page. Clicking restores the view. - Click
: Lock, hide, or show columns in the result set. - Result set search: Supports Fuzzy and Exact.
- Click the small arrow next to column names to sort the result set.
- Copy Row: Right-click the target cell, select Copy Row, and copy the entire row of the cell.
- Copy Column: Right-click the target cell, select Copy Column, and copy the entire column of the cell.
- Copy Field: Right-click the target cell, select Copy Field, and copy the current cell.
- Copy as: Right-click the target cell, select Copy as, and choose to copy the row data in multiple formats.
- Export: Right-click any cell, select Export, and export the current result set in various formats, exporting the current page or all data (up to 10,000 rows).
- View SQL for Result Set: Hover over the tab of the target result set to display the SQL statement for that result set.
- View Field Details: Hover over the target field to display its name, data type, length, and comments.
- Single-Column Search: Click the
icon to the right of the target column name, then enter a keyword in the text box to filter and search within that column.
|