SQLite Forum

Support for Markdown formatted table output from a query
Login
[Markdown extended specification](https://www.markdownguide.org/extended-syntax) outlines syntax for formatting a table using pipe-char (for columns) and dash (for header row). While there are some aditional features and other specifications related to Markdown tables, for the most part the pipe-and-dash formatting is common.

I'd like SQLite to be able to generate Markdown-ready output from SQLite queries. Such output could be readily usable in reports, even can be inserted into GitHub Issues (which does support Markdown tables).

Currently, it's possible in the SQLite client to set the `.separator` to pipe to get the column formatting, however there's currently no way to generate dash-formatting for the table header (`.header on`).

It'd be useful to have some Markdown setting/mode, that would trigger `|---|---|` kind of formatting when (`.header on`), maybe (`.header md` ??).

Here's an example of a Markdown table formatting:

```
 id|type|value
 --|----|-----
  1| A  |A-val
  2| B  |B-val
  3| C  |C-val
```

In HTML it results in a table:

 id|type|value
 --|----|-----
  1| A  |A-val
  2| B  |B-val
  3| C  |C-val