Saturday, 18 October 2025

Create a Free SQL Database in Azure and query using query editor

 


How to Create a Free SQL Database in Azure (with Screenshots)

Getting started with SQL databases in the cloud is easy with Microsoft Azure. Follow the step-by-step tutorial below to create your own free Azure SQL Database and run queries using the Azure Portal.


1. Log in to the Azure Portal

Go to https://portal.azure.com/ and sign in with your Microsoft account. On the homepage, you’ll find options like Create a resource, Azure SQL Database, and more.




2. Create a New SQL Database

Click on Azure SQL Database or use the search bar to find it. Click the Create button to start the creation process.




3. Configure Database Basics

Fill out the basic details:

  • Subscription: Choose your Azure subscription.
  • Resource group: Create a new resource group or select an existing one.
  • Database name: Enter a meaningful name.
  • Server: Click "Create new" to set up a SQL server (see next step).

4. Set Up SQL Database Server

In the server creation form, provide:

  • Server name: A unique name.
  • Location: Select the Azure region.
  • Authentication: Set admin login and password.


5. Configure Networking Options

On the networking screen:

  • Set Allow Azure services and resources to access this server to No.
  • Set Add current client IP address to Yes.​



6. Additional Settings: Add Sample Data

On the Additional settings tab, choose Sample under “Use existing data”. This loads the AdventureWorksLT sample database for learning and testing.​




7. Review and Create

Click Review + create at the bottom and let Azure deploy your database.


8. Query the Database

Once deployed, go back to the list of your SQL databases and select the one you’ve just created.2_Create.jpg​

  • Open Query editor (preview).
  • Log in with the credentials you set for your server.


9. Sample Query and Output

Here’s how the query and results look in the Azure Portal’s Query Editor :​

sql

SELECT * FROM [SalesLT].[Customer]



You’ll see a result table with columns such as CustomerID, NameStyle, Title, and FirstName.


No comments:

Post a Comment

Sample Text

Sample text