SQL Database Query Editor In Azure Portal - An Introduction

Introduction

Just imagine that you have hosted SQL Server Database on Microsoft Azure Cloud. You get a news that there is some error in your SQL Query, and you don't have SQL Server Management Studio to fix the error. Scared? No, you don't have to be scared. Luckily, Microsoft Azure has a solution to your problem.

A year ago, on January 30, 2017, Microsoft announced a new feature for SQL Server databases in Azure, called Query Editor, (which is still in preview mode), to encounter such situations and help the developers to write SQL queries right from their browsers. It is a compact version of SQL Server Data Tools (available in Visual Studio) with limited functionality. You can read more about SQL Server Data Tools on VisualStudio.com 

Getting Started with Query Editor

Query Editor comes along with SQL Databases; you don't need any additional configurations. Click on SQL Database and you will find the Query Editor in the left pane.

SQL Database Query Editor

Selecting the query editor will open a new blade.

SQL Database Query Editor

First, you need to log into your SQL Server with the credentials. Query editor allows the following 3 ways to login to SQL server.

  1. Active Directory Single Sign-On (SSO) 
  2. SQL Server authentication
  3. Active Directory Password Authentication

    SQL Database Query Editor

All you need to select the method and proceed by hitting OK. Upon successful login, you will see the following window.

SQL Database Query Editor

Exploring the Query Editor

The following objects you can find in Query Editor.

  • Tables: List of all the tables and table structure(can be found by expending the tree)
  • Views: List of all views
  • Stored Procedures: List of all System and user-defined stored procedures

    SQL Database Query Editor

Executing Queries

Query Editor allows you to create multiple tabs and to execute multiple queries simultaneously. You can write simple and complex queries as well. You can write new queries, and upload queries (all text file formats are supported).

In the case of select queries, you can directly search from your resultset. 

SQL Database Query Editor

Editing records in table

Just like SQL Server Management Studio and SQL Server Data Tools, Query Editor allows you to edit the table records right from your browser. You can create new rows, delete rows, and edit the record of a particular row as well.

In order to edit the records of a table, you need to follow the following steps.

  1. Select a table.
  2. Click on Edit Data.
  3. Double click on a record to edit.

The table will be loaded in a new tab of the blade.

SQL Database Query Editor

Conclusion

Query Editor is a great tool but it has very limited features. It has a subset of the functionality of SQL Server Data tools and SQL Server Management Studio. It is still in preview mode and not robust as other tools.


Similar Articles