General SQL Parser and SQL Pretty Printer Formatter options
Index

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:

NameValue
TLzHighlighterAttributes[sfkIdentifer].SetForegroundInRGB#000000(black)
TLzHighlighterAttributes[sfkIdentifer].StyleItalictrue

Formatted SQL:

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