SQL statements¶
SQream DB supports commands from ANSI SQL.
Data Definition commands (DDL)¶
Command |
Usage |
---|---|
Add a new column to a table |
|
Change the default schema for a role |
|
Change the schema of a table |
|
Create a new database |
|
Create a new external table in the database (deprecated) |
|
Create a new foreign table in the database |
|
Create a new user defined function in the database |
|
Create a new schema in the database |
|
Create a new table in the database |
|
Create a new table in the database using results from a select query |
|
Create a new view in the database |
|
Drop a column from a table |
|
Drop a database and all of its objects |
|
Drop a function |
|
Drop a schema |
|
Drop a table and its contents from a database |
|
Drop a view |
|
Rename a column |
|
Rename a table |
Data manipulation commands (DML)¶
Command |
Usage |
---|---|
Create a new table in the database using results from a select query |
|
Delete specific rows from a table |
|
Bulk load CSV data into an existing table |
|
Export a select query or entire table to CSV files |
|
Insert rows into a table |
|
Select rows and column from a table |
|
Delete all rows from a table |
|
Return rows containing literal values |
Utility commands¶
Command |
Usage |
---|---|
View the |
|
View the |
|
View the |
|
Recreate a view after schema changes |
|
View the |
Saved queries¶
See more about Saved queries
Command |
Usage |
---|---|
Drop a saved query |
|
Executes a saved query |
|
Returns a list of saved queries |
|
Recompiles a query that has been invalidated by a schema change |
|
Compiles and saves a query for re-use and sharing |
|
Shows query text for a saved query |
Monitoring¶
Monitoring statements allow a database administrator to execute actions in the system, such as aborting a query or get information about system processes.
Command |
Usage |
---|---|
Returns a static query plan for a statement |
|
Returns a list of jobs and statements on the current worker |
|
Returns any existing locks in the database |
|
Returns a query plan for an actively running statement with timing information |
|
Shows running statements across the cluster |
|
Returns the version of SQream DB |
|
Stops a query (or statement) if it is currently running |
Workload management¶
Command |
Usage |
---|---|
Add a SQream DB worker to a service queue |
|
Remove a SQream DB worker to a service queue |
|
Return a list of service queues and workers |
Access control commands¶
Command |
Usage |
---|---|
Applies a change to defaults in the current schema |
|
Applies a change to an existing role |
|
Creates a roles, which lets a database administrator control permissions on tables and databases |
|
Removes roles |
|
Returns a list of permissions required to run a statement or query |
|
Grant permissions to a role |
|
Revoke permissions from a role |
|
Rename a role |