Search code examples
sqlconsoleduckdb

How to display full text and all rows in DuckDB console results?


I'm using the DuckDB console (duckdb.exe) on Windows and encountering issues with result display. My queries are truncating both individual row content and the total number of rows shown. Here are the specifics:

  1. Text truncation: When I run a query like:

    SELECT message FROM logs WHERE message ILIKE '%time service de%';
    

    The result truncates the 'message' column content.

    Even when I limit to a single row:

    SELECT message FROM logs WHERE message ILIKE '%time service de%' LIMIT 1;
    
  2. Row limitation: I've noticed that if there are more than 40 rows in the result set, some are omitted from the display.

Questions:

  1. How can I display the complete text of each row in the query results?
  2. Is there a way to show all rows in the result set, regardless of the total count?
  3. Are there any console settings or command-line options to adjust these display behaviors?

Any guidance on configuring the DuckDB console for full result display would be greatly appreciated.


Solution

  • Start with:

    .mode line
    

    assuming you’re using the CLI.