![]() ![]() ![]() constant ?COLOR? Sets the syntax highlighting color used for constant values columns Column-wise rendering of query results clone NEWDB Clone data into NEWDB from the existing database changes on|off Show number of rows changed by SQL cd DIRECTORY Change the working directory to DIRECTORY binary on|off Turn binary output on or off. bail on|off Stop after hitting an error. No semicolon is required at the end of the line. Dot commands must be entered on a single line, and no whitespace may occur before the period. If an argument must contain a space, either single or double quotes may be used to wrap that parameter. Additional arguments to the command are entered, space separated, after the command. ) immediately followed by the name of the command you wish to execute. To use one of these commands, begin the line with a period (. In addition to SQL syntax, special dot commands may be entered that are specific to the CLI client. WAL file (the Write-Ahead-Log) and consolidate all of your data into the single file database. ![]() If using a persistent database, it will automatically checkpoint (save the latest edits to disk) and close. To exit the CLI, press Ctrl-D if your platform supports it. The CLI supports all of DuckDB’s rich SQL syntax including SELECT, CREATE, and ALTER statements, etc. If a semicolon is omitted, hitting enter will allow for multi-line SQL statements to be entered.ĭ SELECT > 'nicely formatted quack' AS my_column, > 'excited quacking' AS another_column my_column Results will be displayed in a table in the terminal. Once the CLI has been opened, enter a SQL statement followed by a semicolon, then hit enter and it will be executed. Use ".open FILENAME" to reopen on a persistent database. v0.3.4 662041e2bĬonnected to a transient in-memory database. You will see a prompt like the below, with a D on the final line. The file may have any arbitrary extension, but. This path can point to an existing database or to a file that does not yet exist and DuckDB will open or create a database at that location as needed. To open or create a persistent database, simply include a path as a command line argument like duckdb path/to/my_database.duckdb. To see additional command line options to use when starting the CLI, use the command duckdb -help.īy default, the CLI will open a temporary in-memory database. If in a PowerShell or POSIX shell environment, use the command. Navigate to that directory in a terminal and enter the command duckdb to run the executable. Once the CLI executable has been downloaded, unzip it and save it to any directory. The DuckDB CLI is based on the SQLite command line shell, so CLI-client-specific functionality is similar to what is described in the SQLite documentation (although DuckDB’s SQL syntax follows PostgreSQL conventions). Please see the installation page under the CLI tab, or download the version for your environment from the DuckDB GitHub releases page (in the “Assets” section).įor pre-release versions, you may compile from source, or download the executable file that is produced from GitHub Actions: It is precompiled for Windows, Mac, and Linux. The DuckDB CLI (Command Line Interface) is a single, dependency free executable. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |