← Customer Feedback for Redgate Settings and activity 1 result found Align equals sign in UPDATE 44 votes Vote Vote Vote We're glad you're herePlease sign in to leave feedback Signed in as (Sign out) Close Close Vote We’ll send you updates on this idea 5 comments · SQL Prompt » Format SQL · Delete… · Admin → How important is this to you? Not at all You must login first! Important You must login first! Critical You must login first! We're glad you're herePlease sign in to leave feedback Signed in as (Sign out) Close Close An error occurred while saving the comment Harish Supe commented · Apr 28, 2017 · Edit… · Delete… 1. Align as -- Unformatted code select LongColumnName as ln, c2 * c3 as result from dbo.SomeTable 2. Align assignment/comparison operators/is null operators/logical operators -- Unformatted code update dbo.SomeTable set LongColumnName = 'Some value', c2 = 1 where c3 = 'Something' and AnotherVeryVeryLongName is null and c5 is not null 3. Align types, default values, parameter directions in stored proc/function definitions -- Unformatted code CREATE procedure dbo.DoSomething @p1 int, @VeryLongParametersName = null, @p2 int, @MayBeShorterName datetime output, @p4 datetime = 0 output, @ShorterName varchar(20), @b datetime, Save Submitting... Harish Supe supported this idea · Apr 28, 2017
1. Align as
-- Unformatted code
select
LongColumnName as ln,
c2 * c3 as result
from
dbo.SomeTable
2. Align assignment/comparison operators/is null operators/logical operators
-- Unformatted code
update
dbo.SomeTable
set
LongColumnName = 'Some value',
c2 = 1
where
c3 = 'Something' and
AnotherVeryVeryLongName is null and
c5 is not null
3. Align types, default values, parameter directions in stored proc/function definitions
-- Unformatted code
CREATE procedure dbo.DoSomething
@p1 int,
@VeryLongParametersName = null,
@p2 int,
@MayBeShorterName datetime output,
@p4 datetime = 0 output,
@ShorterName varchar(20),
@b datetime,