Microsoft has finally introduced a handy and very important feature for Azure SQL Database. If you were looking to running queries against an SQL database hosted on Azure cloud, your wish has just been granted by Microsoft. I was really missing this feature, to be honest.
We are excited to announce the availability of an in-browser query tool that provides you an efficient way to execute queries on your Azure SQL Databases and SQL Data Warehouses without leaving the Azure Portal. This SQL Database Query Editor is now in public preview in the Azure Portal.
For running queries against an Azure hosted database, you might be using either SSMS, or the in-built SQL server explorer present in the Visual Studio IDE. Although, that is not tedious but the presence of an in-browser query tool will be helpful for a seamless experience.
If you are already familiar with handling the queries, running T-SQL scripts in SQL Server Management Studio (SSMS), you will quickly feel at home working with in-browser query editor. I have indeed tried the tool, and it works just fine, although it is in preview.
How to find Query Editor
You can find this experience by navigating to your SQL database and clicking the Tools command and then clicking Query Editor (preview), as shown in the screenshots below. While this feature is in public preview, you will need to accept the preview terms before using the editor.
SQL Data Warehouse
You can find this experience by navigating to your SQL data warehouse and clicking on Query Editor (preview), shown in the screenshot below. While this feature is in public preview, you will need to accept the preview terms before using the editor.
Query Editor capabilities
Connect to your database
Before executing queries against your database, you must login with either your SQL server or Azure Active Directory (AAD) credentials. If you are the AAD admin for this SQL server, you will be automatically logged in when you first open the Query Editor using AAD single sign-on.
Write and execute T-SQL scripts
If you are already familiar with writing queries in SSMS, you will feel right at home in the in-browser Query Editor.
Many common queries can be run in this editor, such as create new table, display table data, edit table data, create a stored procedure, or drop table. You have the flexibility to execute partial queries or batch queries in this editor. And by utilizing syntax highlighting and error indicating, this editor makes writing scripts a breeze.
Additionally, you can easily load an existing query file into the Query Editor or save your current script in this editor to your local machine. This ability provides you the convenience to save and port the queries between editors.
Manage query results
Another similarity between this Query Editor and SSMS is the ability to resize the Results pane to get the desired ratio between the Editor and Results sections. You can also filter results by keyword rather than having to scroll through all the output.
Run sample query
You can quickly test out the editor by running a simple query, such as in the screenshot below.