Swasti
Swasti

Reputation: 287

kusto command to create a table within highlighted database

I want to write a query to select a DB and then create a table within that DB. I have the following query to just create a table, Is there a way to highlight the DB within the command itself?

.create table ABC (
A:string ,
B:string
)

Upvotes: 0

Views: 201

Answers (1)

Yoni L.
Yoni L.

Reputation: 25895

Is there a way to highlight the DB within the command itself?

No - as the command runs in the context of a specific database, you must first make sure you're in the context of the database in which you wish to create the table.

In the web interface, that means 'selecting' the database in the connections panel.

In the API, that means explicitly specifying the database name in the connection string builder (or as part of the REST request parameters), or when calling the method to execute the control command.

Upvotes: 1

Related Questions