Skip to content
Scott C Gray edited this page Feb 26, 2017 · 7 revisions

Most jsqsh commands are preceded with a backslash (\), however a number of commands come with built-in aliases for convenience (see the Alias(s) column). Most jsqsh command take additional command line arguments, for details on how command line arguments work within jsqsh see options.

Command Alias(s) Description
\alias Creates an alias
[[\buf-append \buf_append]]
[[\buf-copy \buf_copy]]
[[\buf-edit \buf_edit]] \edit, vi, emacs
[[\buf-load \buf_load]] :r
\call Call a prepared statement
\connect Establishes a connection to a database.
\create Generates a CREATE TABLE using table definitions
\databases \dbs Displays set of available databases (catalogs)
\describe Displays a description of a database object
\drivers Lists available JDBC driver definitions
\echo Displays a line of text.
\end Ends the current session
\eval :e Read and execute an input file full of SQL
\go go Executes the contents of the current buffer
\help Displays help for a jsqsh command
\history Displays a history of SQL statements executed
\import Imports command packages into jsqsh
\insert Generates INSERT statements from a query
\macro Creates a velocimacro from the current buffer
\prepare Display prepared query metadata
\procs Displays stored procedures
\quit quit Exits jsqsh
\read Reads input from user into variables
\reset Clears the current SQL buffer of its contents.
\select Generates a SELECT using table definitions
\session \s Displays set of sessions or switches to another session.
\set Sets a variable or displays all variables.
\setup Simple guided setup for managing named connections
\show Show various database metadata
\stack Display the stack trace of the most recently displayed error message
\tables Displays tables, views, synonyms, etc.
\tree Shows a tree view of all the tables
\unset Removes a jsqsh variable.
Clone this wiki locally