Share via


Introduction To SQL Database Query Editor In Azure Portal

Prerequisites

  • Azure account.

Recently, Microsoft has announced the availability of an in-browser query tool that provides an efficient way to execute queries on your Azure SQL Databases and SQL Data Warehouses, without leaving the Azure Portal. In this editor, we can access and query our database without needing to connect from a client tool or configure firewall rules.

Note - This SQL Database Query Editor is now in public preview on the Azure Portal.

How to start Query Editor

First, sign into the online Microsoft Azure Portal.

http://csharpcorner.mindcrackerinc.netdna-cdn.com/article/introduction-to-sql-database-query-editor-in-azure-portal/Images/image001.jpg 

Next, open new or existing SQL database account and click the "Tools" tab.

http://csharpcorner.mindcrackerinc.netdna-cdn.com/article/introduction-to-sql-database-query-editor-in-azure-portal/Images/image002.jpg

Now, choose Query Editor (preview) option in "Tools" menu.

http://csharpcorner.mindcrackerinc.netdna-cdn.com/article/introduction-to-sql-database-query-editor-in-azure-portal/Images/image003.jpg

Before getting SQL Query Editor, we need to accept the preview terms, then we will get SQL Query Editor.

http://csharpcorner.mindcrackerinc.netdna-cdn.com/article/introduction-to-sql-database-query-editor-in-azure-portal/Images/image004.jpg

Query Editor capabilities

Connect to your database

Before executing queries against our database, we must login with either of our SQL Server credentials.

http://csharpcorner.mindcrackerinc.netdna-cdn.com/article/introduction-to-sql-database-query-editor-in-azure-portal/Images/image005.jpg

Write T-SQL Scripts

We can run many common queries in this editor, such as create a new database, table, display table data, edit table data, create a stored procedure, or drop table.

http://csharpcorner.mindcrackerinc.netdna-cdn.com/article/introduction-to-sql-database-query-editor-in-azure-portal/Images/image006.jpg

Execute T-SQL Scripts

After entering our queries, we need to click the Run button for executing those queries.

http://csharpcorner.mindcrackerinc.netdna-cdn.com/article/introduction-to-sql-database-query-editor-in-azure-portal/Images/image007.jpg 

In addition, we can easily load an existing query file into the Query Editor or save our current script in this editor to our local machine.

http://csharpcorner.mindcrackerinc.netdna-cdn.com/article/introduction-to-sql-database-query-editor-in-azure-portal/Images/image008.jpg

Manage query results

We can resize the "Results" pane to get the needed ratio between the Editor and Results sections. We can also filter the results by keyword rather than having to scroll through all the output.

Summary

In this article, we discussed how to use SQL Database Query Editor on Azure Portal.