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 |
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 |
|
Executes a previously saved query |
|
Returns a static query plan, which can be used to debug query plans |
|
Lists previously saved query names, one per row. |
|
Recompiles a saved query that has been invalidated due to a schema change |
|
View a user’s license information |
|
View the |
|
View the |
|
View the |
|
Recreate a view after schema changes |
|
View the |
|
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 |
|
Returns the system version for SQream DB |
|
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 |
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 all permissions granted to a role in table format |
|
Returns the definition of a global role in DDL format |
|
Returns the definition of a database role in DDL format |
|
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 |