124

I want to create a table to better illustrate my question, but I cannot find any option to do so.

Return to FAQ index

0

2 Answers 2

100

Tables have been added to Stack Exchange as of December 2020.

This is what you want:

|id|name |email|
|--| --- | --- |
|1 | Sta |[email protected]|
|2 |Danny|[email protected]|
|3 |Elle |[email protected]|

This will give you a pure HTML table, like this:

id name email
1 Sta [email protected]
2 Danny [email protected]
3 Elle [email protected]

This table is based on the GitHub-flavored markdown table extension specification.

Details of the feature are included in its announcement in New Feature: Table Support.

1
  • is ther e not a generator out there that does this for us? this seems painful Commented Apr 25, 2024 at 2:23
6

If you want to provide sample data for your [sql]-tagged question, please use common table expression rather than ascii-formatted tables.

with t (id,name,email) as (values
  (1 ,'Sta'  ,'[email protected]'),
  (2 ,'Danny','[email protected]'),
  (3 ,'Elle' ,'[email protected]')
)
select your_attempt from t

Ideally prepared as code snippet on some SQL playground engines such as db fiddle. It makes potential helper's work easier since s/he concentrates on answer instead of text formatting.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.