General SQL Parser and SQL Pretty Printer Formatter options

After formatting sql, beautified sql was in plain text. There are 2 ways you can generate beautified sql in colored text with syntax highlighting, RTF and HTML output.

The default font of output is Courier New, and it works fine. Please don't change this font although you can set new font by using gFmtOpt.HighlightingFontname. The default font size of output is 10, and it can be changed by setting new value to gFmtOpt.HighlightingFontsize. HighlightingFontname and HighlightingFontsize apply to whole output, and you can also customize each token with different color and style by using

Example format options:


Formatted SQL:

SELECT      AS product,
       p.listprice AS 'List Price',  AS 'discount' 
FROM   production.product p 
       JOIN production.productsubcategory s ON p.productsubcategoryid = s.productsubcategoryid 
WHERE LIKE @product 
       AND p.listprice < @maxprice;