Skip to content

Latest commit

 

History

History
76 lines (70 loc) · 2.52 KB

File metadata and controls

76 lines (70 loc) · 2.52 KB
title azdata sql reference
titleSuffix SQL Server big data clusters
description Reference article for azdata sql commands.
author MikeRayMSFT
ms.author mikeray
ms.reviewer mihaelab
ms.date 06/22/2020
ms.topic reference
ms.prod sql
ms.technology big-data-cluster

azdata sql

[!INCLUDESQL Server 2019]

The following article provides reference for the sql commands in the azdata tool. For more information about other azdata commands, see azdata reference.

Commands

Command Description
azdata sql shell The SQL Database CLI allows the user to interact with SQL Server via T-SQL.
azdata sql query The query command allows execution of a T-SQL query.

azdata sql shell

The SQL Database CLI allows the user to interact with SQL Server via T-SQL.

azdata sql shell 

Examples

Example command line to start the interactive experience.

azdata sql shell

Global Arguments

--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--output -o

Output format. Allowed values: json, jsonc, table, tsv. Default: json.

--query -q

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

azdata sql query

The query command allows execution of a T-SQL query.

azdata sql query --database -d 
                 -q

Examples

Select the list of tables names. Database defaults to master.

azdata sql query "SELECT name FROM SYS.TABLES"

Required Parameters

--database -d

Database to run query in. Default is master.

-q

T-SQL query to execute.

Global Arguments

--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--output -o

Output format. Allowed values: json, jsonc, table, tsv. Default: json.

--query -q

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Next steps

For more information about other azdata commands, see azdata reference. For more information about how to install the azdata tool, see Install azdata to manage SQL Server 2019 big data clusters.