Skip to content

SQL layout reservation

Tako Lee edited this page Feb 20, 2014 · 2 revisions

Keep part of SQL code layout unchanged while formatting other queries. Using --begin_no_format and --end_no_format to keep layout between these 2 tags.

Original SQL:

CREATE PROCEDURE uspnresults 
AS 
SELECT COUNT(contactid) FROM person.contact 
--begin_no_format 
SELECT COUNT(customerid) FROM sales.customer; 
--end_no_format 
GO 

After format:

CREATE PROCEDURE Uspnresults  
AS  
 SELECT Count( contactid )  
 FROM   person.contact  

--begin_no_format  
SELECT Count(customerid) FROM sales.customer; 
--end_no_format  
GO  
Clone this wiki locally