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
We will adapt a single database model to get started with SQL Server concepts.
Create a single database
- Log-in to Azure Portal.
- 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.CountryRegionFROM [SalesLT].[Customer] cJOIN [SalesLT].[Address] aON c.CustomerID = a.AddressID
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.
- Build apps and APIs 10x faster
- Built-in authorization and caching
- 8x more performant than hand-rolled APIs