Topic: Database Management Commands For Azure Data Explorer by using Kusto Query
Database Management Commands For Azure Data Explorer by using Kusto Query | Kusto Query Language Tutorial (KQL) Kusto Query Language is a powerful tool to explore your data and discover patterns, identify anomalies and outliers, create statistical modeling, and more. The query uses schema entities that are organized in a hierarchy similar to SQL's: databases, tables, and columns. A Kusto query is a read-only request to process data and return results. The request is stated in plain text, using a data-flow model that is easy to read, author, and automate. Kusto queries are made of one or more query statements.
//Database Control Commands
.show databases //Returns a table in which every record corresponds to a database in the cluster that the user has access to
.show database //Returns a table showing the properties of the context database
.show cluster databases //Returns a table showing all databases attached to the cluster and to which the user invoking the command has access
.alter database prettyname // Alters a database's pretty (friendly) name
.show database schema //Returns a flat list of the structure of the selected databases with all their tables and columns in a single table or JSON object
.execute database script //Executes batch of control commands in scope of a single database
.show databases
.show database
.show cluster databases
.alter database techbrothersdb prettyname 'demo'
// create multiple tables in a database by using Kusto
.execute database script <|
//create new table
.create table customer(customerid:int,customerName:string)
//create another table
.create table Sale(salid:int,productname:string)
//Show list of Tables with data types by using Kusto
.show database schema
// Drop multiple tables in Azure Data Explorer Database by using Kusto
.execute database script <|
//create new table
.drop table customer
//create another table
.drop table Sale