120

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

95

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
    – mike01010
    Commented Apr 25 at 2:23
5

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.

Not the answer you're looking for? Browse other questions tagged .