.create table

Creates a new empty table.

The command must run in context of a specific database.

Requires Database user permission.

Syntax

.create table TableName ([columnName:columnType], ...) [with ([docstring = Documentation] [, folder = FolderName] )]

If the table already exists, the command will return success.

Example

.create table MyLogs ( Level:string, Timestamp:datetime, UserId:string, TraceId:string, Message:string, ProcessId:int32 ) 

Return output

Returns the table's schema in JSON format, same as:

.show table MyLogs schema as json

Note

For creating multiple tables, use the .create tables command for better performance and lower load on the cluster.