How to Change the Output Mode in the DuckDB CLI

DuckDB is a database management system tailored for analytical tasks. Its command line interface (CLI) provides a convenient way to interact with databases and execute queries. The CLI provides us with the ability to configure the output mode for query results, offering flexibility in how data is displayed or exported.

This article provides a quick overview of how to change the output mode in the DuckDB CLI.

Continue reading

Getting Started with DuckDB Command Line Interface

DuckDB is a high-performance in-process analytical database management system, often referred to as the “SQLite for analytics.” Its Command Line Interface (CLI) is a useful tool for executing SQL queries, managing databases, and exploring DuckDB’s features.

This article provides a comprehensive guide to the basics of using DuckDB’s CLI, helping beginners and advanced users alike understand how to leverage it effectively.

Continue reading

Understanding the .changes Command in SQLite

The .changes dot command in SQLite is a helpful utility for developers working with databases, especially when tracking the number of rows affected by SQL statements like INSERT, UPDATE or DELETE.

When used in the SQLite command-line interface, .changes toggles an option that shows the count of modified rows after executing a command.

This article looks at how the .changes command works, how it can be enabled or disabled, and provides an example to illustrate how it works.

Continue reading

An Overview of Dot Commands in SQLite

SQLite is a lightweight, self-contained, and highly reliable SQL database engine used widely for developing and testing small-scale applications. One unique feature of SQLite is the set of “dot commands” used in the SQLite command-line interface (CLI) to execute various actions related to database management, navigation, and configuration.

These dot commands are not part of SQL syntax itself but provide a convenient way to manage and interact with SQLite databases.

Continue reading

Redis ZREVRANGEBYLEX Replacement

Starting with Redis 6.2.0, the ZRANGE command added the REV, BYSCORE, BYLEX and LIMIT options. The addition of the first three options means that the ZRANGE command can now do what the ZREVRANGE, ZRANGEBYSCORE, ZREVRANGEBYSCORE, ZRANGEBYLEX and ZREVRANGEBYLEX commands can do.

As a result, those commands are now deprecated (as of Redis 6.2.0).

Therefore, we should no longer use the ZREVRANGEBYLEX command. Instead, we should use the ZRANGE command with the BYLEX and REV arguments.

Continue reading