Splice Machine Commands Reference
This section contains a reference topic page for each Splice Machine command. Another topic, Using the splice> Command Line Interface, presents general syntax and usage help for the splice> prompt.
- Commands you can use in all Splice Machine products, which means that you can use them with the Zeppelin notebook interface in our Cloud-Managed Database Service, and with the splice> command line interface in our On-Premise Database.
- Commands you can only use with the splice> command line interface in our On-Premise Database. These are mostly commands that display information about the database in a terminal interface.
Commands You Can Use in All Splice Machine Products
The following table sunmmarizes the commands that you can use with both Zeppelin notebooks in our Cloud-Managed Database Service, and with the splice> command line interface in our On-Premise Database.
|Analyze||Collects statistics for a table or schema.||splice> analyze table myTable;
splice> analyze schema myschema;
|Autocommit||Turns the connection's auto-commit mode on or off.||splice> autocommit off;|
|Commit||Commits the currently active transaction and initiates a new transaction.||splice> commit;|
|Execute||Executes an SQL prepared statement or SQL command string.||splice> execute 'insert into myTable(id, val) values(?,?)' ;|
|Explain||Displays the execution plan for an SQL statement.||splice> explain select count(*) from si;|
|Export||Exports query results to CSV files.||splice> EXPORT('/my/export/dir', null, null, null, null, null) SELECT a,b,sqrt(c) FROM join t2 on t1.a=t2.a;|
|Prepare||Creates a prepared statement for use by other commands.||splice> prepare seeMenu as 'SELECT * FROM menu';|
|Release Savepoint||Releases a savepoint.||splice> release savepoint gSavePt1;|
|Remove||Removes a previously prepared statement.||splice> remove seeMenu;|
|Rollback||Rolls back the currently active transaction and initiates a new transaction.||splice> rollback;|
|Rollback to Savepoint||Rolls the current transaction back to the specified savepoint.||splice> rollback to savepoint gSavePt1;|
|Savepoint||Creates a savepoint within the current transaction.||splice> savepoint gSavePt1;|
Commands You Can Only Use in Our On-Premise Database
The following table sunmmarizes the commands that you can only use with the splice> command line interface in our On-Premise Database.
|Connect||Connect to a database via its URL.||splice> connect 'jdbc:splice://xyz:1527/splicedb';|
|Describe||Displays a description of a table or view.||splice> describe myTable;|
|Disconnect||Disconnects from a database.||splice> disconnect SPLICE;|
|Elapsedtime||Enables or disables display of elapsed time for command execution.||splice> elapsedtime on;|
|Exit||Causes the command line interface to exit.||splice> exit;|
|Help||Displays a list of the available commands.||splice> help;|
|MaximumDisplayWidth||Sets the maximum displayed width for each column of results displayed by the command line interpreter.||splice> maximumdisplaywidth 30;|
|Run||Runs commands from a file.||splice> run myCmdFile;|
|Set Connection||Allows you to specify which connection is the current connection||splice> set connection sample1;|
|Show Connections||Displays information about active connections and database objects.||splice> show connections;|
|Show Functions||Displays information about functions defined in the database or in a schema.||splice> show functions in splice;|
|Show Indexes||Displays information about the indexes defined on a table, a database, or a schema.||splice> show indexes from mytable;|
|Show Primary Keys||Displays information about the primary keys in a table.||splice> show primarykeys from mySchema.myTable;|
|Show Procedures||Displays information about active connections and database objects.||splice> show procedures in syscs_util;|
|Show Roles||Displays information about all of the roles defined in the database.||splice> show roles;|
|Show Schemas||Displays information about the schemas in the current connection.||splice> show schemas;|
|Show Synonyms||Displays information about the synonyms that have been created in a database or schema.||splice> show synonyms;|
|Show Tables||Displays information about all of the tables in a database or schema.||splice> show tables in SPLICE;|
|Show Views||Displays information about all of the active views in a schema.||splice> show views in SPLICE;|