Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

SQL Database Query Editor in Azure Portal: A Deeper Look

DZone's Guide to

SQL Database Query Editor in Azure Portal: A Deeper Look

Query Editor is a great tool but has very limited features. It has a subset of the functionality of SQL Server Data tools and SQL Server Management Studio.

· Database Zone ·
Free Resource

Download the Altoros NoSQL Performance Benchmark 2018. Compare top NoSQL solutions – Couchbase Server v5.5, MongoDB v3.6, and DataStax Enterprise v6 (Cassandra).

Imagine that you have hosted SQL Server Database on Microsoft Azure Cloud and you learn that there is some error in your SQL query. You don't have SQL Server Management Studio to fix the error. Scared? No, you don't need to be. Luckily, Microsoft Azure has a solution to your problem.

A year ago, Microsoft announced a new feature for SQL Server databases in Azure called Query Editor (which is still in preview mode) to handle such situations and help developers write SQL queries right from their browsers. It is a compact version of SQL Server Data Tools (available in Visual Studio) with limited functionality.

Getting Started With Query Editor

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

Image title

Selecting Query editor will open a new blade.

Image title

First, you need to log into your SQL Server with the credentials. Query Editor allows the following three ways to log into SQL server:

  1. Active directory single sign-on (SSO).
  2. SQL Server authentication.
  3. Active directory password authentication.

Image title

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

Main Window

Exploring Query Editor

The following objects can be found in Query Editor:

  • Tables: A list of all the tables and table structures (can be found by expending the tree).

  • Views: List of all views.

  • Stored procedures: List of all system- and user-defined stored procedures.

Image title

Executing Queries

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

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

Image title

Editing Records in a Table

Just like SQL Server Management Studio and SQL Server Data Tools, Query editor allows you to edit 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 records of a table, you need to perform the following steps:

  1. Select a table.

  2. Click Edit Data

  3. Double-click on the record to edit.

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

Image title

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.

Download the whitepaper, Moving From Relational to NoSQL: How to Get Started. We’ll take you step by step through your first NoSQL project.

Topics:
sql azure ,database ,query editor ,sql server

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}