SQL Format options index ->Indentation

	general indentation size, used to indent if no specific indent option provided.
		gFmtOpt.IndentLen
			Integer
			default:4
	Use tab to indent, if other indent size less than gFmtOpt.TabSize, then all that size will
						be set to gFmtOpt.TabSize.
		gFmtOpt.UseTab
			boolean
			default: false
	Tab Size
		gFmtOpt.TabSize
			integer
			default: 4
	function body indent size, stmts inside create function/procedure/trigger. indent from top function level.
		gFmtOpt.BEStyle_Function_BodyIndent
			integer
			default: 4
	begin keyword in new line
		gFmtOpt.BEStyle_Block_leftBEOnNewline
			boolean
			default: true
	indent of begin keyword
		gFmtOpt.BEStyle_Block_leftBEIndentSize
			integer
			default: 2
	indent of end keyword
		gFmtOpt.BEStyle_Block_rightBEIndentSize
			integer
			default: 2
	block body indent size, stmts inside begin/end. indent from begin keywords
		gFmtOpt.BEStyle_BlockIndentSize
			integer
			default: 4
	Indent size of single stmt in if stmt.
		gFmtOpt.BEStyle_IfElseSingleStmtIndentSize
			integer
			default: 2
	case function
		gFmtOpt.Indent_CaseFromSwitch
			integer
			default: 2


SQL before beautify
CREATE PROCEDURE production.usp_getlist @product      VARCHAR ( 40 ) ,
@maxprice     MONEY ,
@compareprice MONEY OUTPUT ,
@listprice    MONEY OUT
AS
SELECT p.name      AS product,p.listprice AS 'List Price'
FROM   production.product p JOIN production.productsubcategory s ON p.productsubcategoryid = s.productsubcategoryid
WHERE  s.name LIKE @product  AND p.listprice < @maxprice;

DECLARE @compareprice money, @cost money 
EXECUTE usp_GetList '%Bikes%', 700, @compareprice OUT,  @cost OUTPUT
IF @cost <= @compareprice 
BEGIN
PRINT 'These products can be purchased for less than' 
rollback
END
ELSE
PRINT 'The prices for all products in this category exceed '

GO
SQL after beautify
CREATE PROCEDURE production.usp_getlist @product      VARCHAR ( 40 ),
                                        @maxprice     MONEY,
                                        @compareprice MONEY OUTPUT,
                                        @listprice    MONEY OUT
AS
    SELECT p.name      AS product,
           p.listprice AS 'List Price'
    FROM   production.product p
           JOIN production.productsubcategory s
             ON p.productsubcategoryid = s.productsubcategoryid
    WHERE  s.name LIKE @product
           AND p.listprice < @maxprice;
    DECLARE @compareprice MONEY,
            @cost         MONEY
    EXECUTE usp_getlist
        '%Bikes%',
        700,
        @compareprice OUT,
        @cost OUTPUT
    IF @cost <= @compareprice
      BEGIN
          PRINT 'These products can be purchased for less than'
          ROLLBACK
      END
    ELSE
      PRINT 'The prices for all products in this category exceed '

GO