Old post, I know. But I came from the search "Why should I mess up SQL?" I just installed a free product called ApexSQL Refactor (without affiliation) that offers an obfuscation component.
It offers several different options to make it easier to read your code. I was not sure why I needed such a function, as others noted the possibility of encrypting your stored procedures. In any case, this is an example of the output that it can return from the obfuscation function.
CrEAtE Procedure spInsertOrUpdateProduct @ProductNumber nVarChar(25), @ListPrice Money aS IF exIsTS(selECt * FROm Production.Product WHere ProductNumber=@ProductNumber AnD ListPrice>1000) uPdatE Production. Product sET ListPrice=(ListPrice-100) where ProductNumber= @ProductNumber elsE INSerT intO Production.Product(ProductNumber, ListPrice) SelECT @ProductNumber,@ListPrice GO SElEct * fRoM Production.Product gO iNsERT iNTo Production.UnitMeasure( UnitMeasureCode,Name,ModifiedDate) vAlUeS(N'FT2',N'Square Feet', '20080923'); Go
InbetweenWeekends
source share