Create an Azure Storage Table

This guide will walk you through the process of creating a new table in Azure Table Storage using the Azure portal and the Azure CLI.

Prerequisites

Using the Azure Portal

The Azure portal provides a user-friendly graphical interface for managing your Azure resources.

  1. Navigate to your Storage Account:

    Sign in to the Azure portal. In the search bar at the top, type "Storage accounts" and select it from the results. Choose the storage account where you want to create the table.

  2. Access Table Storage:

    In the left-hand navigation menu of your storage account, under the Data storage section, select Tables.

  3. Create a Table:

    Click the + Table button at the top of the Tables blade. A panel will appear asking for table details.

  4. Enter Table Name:

    In the Table name field, enter a unique name for your table. Table names must follow specific naming conventions: start with a letter, contain only lowercase letters and numbers, and be between 3 and 63 characters long.

  5. Set Access Level:

    Choose the desired access level for your table. For most use cases, Private is recommended for security.

  6. Create the Table:

    Click the OK button. Your new table will be created and listed in the Tables blade.

Tip: Azure Table Storage is schema-less. You don't need to define columns upfront. Columns are added implicitly when you insert entities with new properties.

Using the Azure CLI

The Azure Command-Line Interface (CLI) is a powerful tool for automating Azure resource management.

First, ensure you have the Azure CLI installed and are logged in to your Azure account:

az login

To create a table, you'll use the az storage table create command:

az storage table create \
    --name MyNewTable \
    --account-name mystorageaccountname \
    --account-key YOUR_STORAGE_ACCOUNT_KEY

Explanation of Parameters:

If you prefer to use a connection string, you can use that instead of account name and key:

az storage table create \
    --name MyOtherTable \
    --connection-string "DefaultEndpointsProtocol=https;AccountName=mystorageaccountname;AccountKey=YOUR_STORAGE_ACCOUNT_KEY;EndpointSuffix=core.windows.net"

Upon successful execution, the CLI will return JSON output confirming the table creation.

Note: For production scenarios, avoid hardcoding storage account keys. Use environment variables, Azure Key Vault, or managed identities to securely manage credentials.

Next Steps