SQL Statements
The SQL Statements page describes the following commands:
SQream supports commands from ANSI SQL.
Data Definition Commands (DDL)
The following table shows the Data Definition commands:
Command  | 
Usage  | 
|---|---|
Add a new column to a table  | 
|
Change the default schema for a role  | 
|
Change the schema of a table  | 
|
Change clustering keys in a table  | 
|
Create a new database  | 
|
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  | 
|
Drops all clustering keys in a table  | 
|
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  | 
|
Rename a schema  | 
Data Manipulation Commands (DML)
The following table shows the Data Manipulation commands:
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  | 
|
Modify the value of certain columns in existing rows without creating a table  | 
|
Return rows containing literal values  | 
Utility Commands
The following table shows the Utility commands:
Command  | 
Usage  | 
|---|---|
Drops a saved query  | 
|
View the   | 
|
Executes a previously saved query  | 
|
Returns a static query plan, which can be used to debug query plans  | 
|
Lists and saves information about all currently open snapshots to a specified file  | 
|
Transfer data files stored within the database’s internal staging area to a user’s local file system.  | 
|
Retrieves information of specific chunks  | 
|
View the   | 
|
Retrieves information of specific extents  | 
|
View the   | 
|
View a user’s license information  | 
|
Graceful shutdown of all servers in the cluster  | 
|
Monitor license quota usage by reviewing monthly or daily GPU usage  | 
|
Lists information about all currently open snapshots  | 
|
Returns the total size of all data chunks saved in the system  | 
|
View the   | 
|
Returns system health monitoring logs  | 
|
Enables you to specify the LDAP attributes you want the SQreamDB role catalog table to show  | 
|
Lists previously saved query names, one per row  | 
|
Transfer data files stored within a user’s local file system to the database’s internal staging area.  | 
|
Enables you to merge small data chunks into larger ones  | 
|
Recompiles a saved query that has been invalidated due to a schema change  | 
|
Recreate a view after schema changes  | 
|
Delete data files stored within the database’s internal staging area.  | 
|
Clears locks  | 
|
Clears all locks in the system  | 
|
Returns a list of active sessions on the current worker  | 
|
Returns a list of locks from across the cluster  | 
|
Returns a snapshot of the current query plan, similar to   | 
|
Returns a single row result containing the saved query string  | 
|
Returns a list of active sessions across the cluster  | 
|
Sets your server to finish compiling all active queries before shutting down according to a user-defined time value  | 
|
Stops or aborts an active statement  | 
|
Returns the system version for SQream DB  | 
|
Swaps the names of two tables contained within a schema  | 
Workload Management
The following table shows the Workload Management commands:
Command  | 
Usage  | 
|---|---|
Add a SQream DB worker to a service queue  | 
|
Remove a SQream DB worker from a service queue  | 
|
Return a list of service queues and workers  | 
Access Control Commands
The following table shows the 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 the definition of all role databases in DDL format  | 
|
Returns all permissions granted to a role in table format  | 
|
Returns the definition of a global role in DDL format  | 
|
Returns the definition of all global roles in DDL format  | 
|
Returns the definition of a role’s database in DDL format  | 
|
Returns a list of permissions required to run a statement or query  | 
|
Grant permissions to a role  | 
|
Grant service usage permissions  | 
|
Revoke permissions from a role  | 
|
Rename a role  |