MySQL Studio - SQL Workshop

Overview

SQL Workshop in MySQL Studio is your comprehensive environment for interacting directly with your MySQL AI database using SQL. It features a robust SQL command window for writing and executing queries, as well as a library of sample SQL statements to help you get started quickly. SQL Workshop goes beyond basic query execution by providing advanced introspection tools such as interactive table and chart views, a detailed history of your executed statements, and a schema viewer for exploring your database structure. This suite of features empowers you to analyze, visualize, and understand your data with ease.

Query Entry Window

The central area of SQL Workshop is the Query Entry Window, where you write and edit your SQL statements. This serves as your primary workspace for entering custom queries or selecting from sample statements.

Main Toolbar

Positioned above the Query Entry Window, the Main Toolbar provides quick access to important actions such as: - Run: Execute the SQL currently in the query window - Run Menu: The Run button is a split-menu item providing access to additional options - Explain plan to get MySQL’s execution plan for the query - Sample queries Various sample queries such as Show database version, Show users and more - AI Explain: Use the Ask Oracle feature to generate an AI-based explanation of your query - Reset Connection: Re-establish your SQL session if necessary - History: View a popup with all your recently executed SQL statements for easy reference or rerunning

Database Objects Panel

Located on the left, the Database Objects Panel displays all available database schemas and databases in your MySQL AI environment. At the top of this panel, a search facility allows you to quickly filter and locate specific objects by name. You can browse tables and structures, with context menus for each object providing quick actions: - Copy fully qualified name for use in your SQL statements - Describe this table to run a describe command - Drop table to remove a table from your database

Results Drawer

The Results Drawer appears at the bottom of SQL Workshop when you execute a query. It consists of two main sections: 1. Query Details Sidebar This sidebar summarizes your query with metrics like total duration, rows affected, and time taken. It also lists all result sets generated by your SQL — click on any result set to view its data. 2. Results Area The selected result set is displayed as a table, complete with pagination controls for browsing large datasets. You can also switch to data visualizations by choosing Chart and selecting a chart type such as Bar, Line, Pie, or Scatter.

Executing and Working with Queries

Execute a Query Type your SQL statement in the Query Entry Window and click Run to execute it against your MySQL AI database.

Explain a Query Use Explain plan from the dropdown next to Run to view how your query will be executed, helping you understand and improve performance.

Run Sample Queries Select helpful built-in sample queries located in the dropdown next to the Run button to quickly explore your database’s features and capabilities.

Working with Results

View Multiple Results Your SQL statement can return one or more result sets, especially when dealing with stored procedures. The Query Details Sidebar lists each result — click an entry to display its data. Note that the number of result sets may differ from the number of input statements.

Tabular and Chart Views By default, results appear as tables with pagination controls. For visual insights, use the Chart option and select between Bar, Line, Pie, or Scatter charts to visualize your data.