Sign up for Hasura Newsletter

Setup SQL database on Azure SQL

On this page, you create a single SQL database in Azure and query the database using the query editor in the Azure portal.

Before you begin, make sure to have an active Azure subscription. Create a free account in Azure if you do not already have one.

What is Azure SQL

Azure SQL is a relational database-as-a-service (DBaaS) hosted in Azure.

Azure SQL has major advantages such as: Built-in high availability, Hyperscale model, Serverless, Intelligence, data Management, lower administration, shared lower cost, On premises/hybrid cloud, automated performance tuning, automated backup and restore, and automated apply patches.

Azure SQL provides the following SQL deployment options:

  • SQL databases
  • SQL managed instances
  • SQL virtual machines

SQL deployment options

We will adapt a single database model to get started with SQL Server concepts.

Create a single database

  1. Log-in to Azure Portal.
  2. Select the deployment option as SQL databases, select Single database from the Resource type dropdown, and select Create.

Follow the MS article to set your preferred configurations on Azure.

Query the database

Once your database is created, you can use the Query editor (preview) in the Azure portal to connect to the database and query the data.

Run the following query in the Query editor on the sample tables:

SELECT c.firstName, c.Title, a.CountryRegion
FROM [SalesLT].[Customer] c
JOIN [SalesLT].[Address] a
ON c.CustomerID = a.AddressID

Query Editor

Although most of the concepts of SQL Server database explained in the following sections hold good for Azure SQL however; there are a few key differences as explained in the Azure SQL Limitations section.

Did you find this page helpful?
Start with GraphQL on Hasura for Free
  • ArrowBuild apps and APIs 10x faster
  • ArrowBuilt-in authorization and caching
  • Arrow8x more performant than hand-rolled APIs
Promo
footer illustration
Brand logo
© 2022 Hasura Inc. All rights reserved
Github
Titter
Discord
Facebook
Instagram
Youtube
Linkedin