Thanks to visit codestin.com
Credit goes to dev.mysql.com

SQL Workshop

SQL Workshop in MySQL Studio is your comprehensive environment for interacting directly with MySQL AI 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 Query: Execute the SQL currently in the query window. - Run Query Menu: The Run Query button is a split-menu item providing access to additional options. - Explain plan to get MySQL AI’s execution plan for the current query. - Sample queries Various sample queries such as Show database version, Show users and more. - Reset Connection: Re-establish your SQL session if necessary. - AI Explain: Use the Ask Oracle feature to generate an AI-based explanation of your query. - Natural Language Query: Use the Natural Language Query feature to ask AI to generate a SQL query for you using plain english. - Save to My Files: Save the current query file to the My Files space as a .sql file. You can open .sql files and use the SQL view to run the saved query. - View Async Tasks: Use the Async Task viewer to see current and completed asynchronous tasks running in MySQL AI. - History: View a popup with all your recently executed SQL statements for easy reference or re-run.

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. Results Area The selected result set is displayed as a table – complete with pagination controls for browsing large datasets – or chart (depending on your View Settings) allowing you to visualize the results in a bar, line, pie, or scatter plot. 2. View Settings Select which data visualization to use, either as a Table or available Chart by selecting Bar, Line, Pie, or Scatter. Configure chart specific details as necessary (e.g. which column to plot on X and/or Y axies, axis minimum and maximums etc.) 2. Query Details Sidebar Summarizes your query with metrics like total duration, rows affected and time taken. It also lists all result sets generated by your SQL statement — click on any result set to view its data.

Executing and Working with Queries

Execute a Query

Type your SQL statement in the Query Entry Window and click Run Query to execute it using MySQL AI.

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, select the appropriate chart type (Bar, Line, Pie, or Scatter) in View Settings to visualize your data.

Copyright (c) 2025, Oracle and/or its affiliates.