Skip to content

Latest commit

 

History

History
75 lines (69 loc) · 2.5 KB

File metadata and controls

75 lines (69 loc) · 2.5 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 11/04/2019
ms.topic reference
ms.prod sql
ms.technology big-data-cluster

azdata sql

[!INCLUDEtsql-appliesto-ssver15-xxxx-xxxx-xxx]

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

Commands

azdata sql shell The SQL DB 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 DB 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 -q --database -d

Examples

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

azdata sql query -q '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.