Microsoft

Create an Azure SQL Database

This tutorial walks you through creating a new Azure SQL Database using the Azure portal.

Prerequisites

Step 1 – Sign in to the Azure portal

Open https://portal.azure.com and sign in with your Azure account.

Step 2 – Create a new SQL Database

  1. In the left navigation pane, select Create a resourceDatabasesSQL Database.
  2. On the Basics tab, fill in the following fields:
    • Subscription: Choose your subscription.
    • Resource group: Select an existing group or create a new one.
    • Database name: mySampleDB
    • Server: Click Create new and provide a server name, admin login, password, and location.
    • Compute + storage: Choose the appropriate pricing tier (the default Basic tier is fine for a test).
  3. Leave the remaining settings at their defaults and click Review + create.
  4. After validation passes, click Create. The deployment may take a few minutes.

Step 3 – Verify the deployment

When deployment succeeds, click Go to resource. You should see the overview page for your new database.

Optional: Create a table using Query Editor

Azure provides a built‑in query editor for quick testing.

  1. From the database's overview page, select Query editor (preview) in the left menu.
  2. Log in with the server admin credentials.
  3. Run the following T‑SQL script to create a sample table:
CREATE TABLE dbo.Products (
    ProductID INT IDENTITY(1,1) PRIMARY KEY,
    ProductName NVARCHAR(100) NOT NULL,
    Price MONEY NOT NULL,
    CreatedDate DATETIME2 DEFAULT SYSDATETIME()
);

After executing the script, you can query the table:

SELECT TOP 10 * FROM dbo.Products;

Next steps