Command name |
Command description |
. Help |
List all built-in commands. |
. Backup dbname File |
Back up a specified database to a specified file. The default value is the currently connected main database. |
. Databases |
Lists all the attached database names and file names in the current connection. |
. Dump tablename... |
Dump is currently connected to the main database in SQL text format. If the table name is specified, it is only a data table that matches the dump and table name. The tablename parameter supports wildcards supported by the like expression. |
. Echo on | off |
Turn on or off the display output. |
. Exit |
Exit the current program. |
. Explain on | off |
Enable or disable the select output of the current connection in the form of human readable. |
. Header (s) on | off |
Whether to display the column title when the select result is displayed. |
. Import file table |
Import the data of the specified file to the specified table. |
. Indices tablename |
Display the names of all indexes. If the table name is specified, only the indexes of the data tables matching the table name are displayed. The tablename parameter supports wildcards supported by the like expression. |
. Log File | off |
Enable or disable the log function. file can output stdout for standard output or stderr for standard error output. |
. Mode mode tablename |
Set the output mode. The most common mode is column mode, which enables the select output column to be left aligned. |
. Nullvalue string |
Use the specified string to display the null value. |
. Output Filename |
Redirects all output of the current command to the specified file. |
. Output stdout |
Redirects all output of the current command to the standard output (screen ). |
. Quit |
Exit the current program. |
. Read filename |
Execute the SQL statement in the specified file. |
. Restore dbname File |
Restore the database from the specified file. The default value is the main database. You can also specify other database names. The specified database becomes the currently connected attached database. |
. Schema tablename |
The table creation statement is displayed. If the table name is specified, only the table creation statements matching the table name are displayed. The tablename parameter supports wildcards supported by the like expression. |
. Separator string |
Change the delimiter between output mode and. Import fields. |
. Show |
Displays the current values of various settings. |
. Tables tablename |
Lists all the table names of the main database in the current connection. If the table name is specified, only the table names matching the table name are displayed. The tablename parameter supports wildcards supported by the like expression. |
. Width num1 num2... |
When mode is column, set the width of each field. Note: The Parameter order of this command indicates the field output order. |