Skip to content

SQL list comma option

Tako Lee edited this page Feb 21, 2014 · 11 revisions

Comma option is used to set style of comma in list items, so it's valid only when used with list option.

  • After item

    SELECT Name, ProductNumber, ListPrice AS Price
    FROM Production.Product 
    ORDER BY Name ASC;
    SELECT Name, 
           ProductNumber, 
           ListPrice AS Price
    FROM Production.Product
  • After item and followed by a space

    SELECT Name, ProductNumber, ListPrice AS Price
    FROM Production.Product 
    ORDER BY Name ASC;
  • Before item

  • Before item and preceded by 1 or n space(s)

Clone this wiki locally