Align Definition Data Types - extend to computed columns

a.higginsa.higgins Posts: 90 Bronze 2
edited November 16, 2016 1:30PM in SQL Prompt
I like the new option to align definition data types and constraints, but it doesn't seem to apply to computed columns.

For example, the following code is formatted with the new feature:
CREATE TABLE #Something
	(
		Something_SK				  INT IDENTITY(1, 1) NOT NULL
	   ,SomethingNumberWithLongerName NUMERIC(18, 16)
	   ,SomethingDate				  DATETIME2(0)
	   ,SomethingDateKey AS (CONVERT(INT, CONVERT(CHAR(8), SomethingDate, (112)), (0)))
	   ,SomethingTimeKey AS (CONVERT(INT, REPLACE(CONVERT(VARCHAR(8), SomethingDate, (108)), ':', '')))
	)
GO

Shouldn't the indentation of the AS keyword in the computed column definition be aligned with the data types of the other fields?

Comments

Sign In or Register to comment.