I know about the question found at How do I control the datatype of a computed column?
I add a column by using the followed code. However, there is no datatype found in the Object Explorer > Design. I need the end result employment to show up Object Explorer as Employment numeric (9,0)
alter table dbo.equi add employment AS CAST((m1+m2+m3)/3 AS numeric(9));
I have three columns
m1 numeric (6,0)
m2 numeric (6,0)
m3 numeric (6,0)
So to follow the lead in the previous question, would I use something like this:
CONVERT(numeric(9,0), (
CONVERT(NUMERIC(6, 0), [M1])
* CONVERT(NUMERIC(6, 0), [M2])
* CONVERT(NUMERIC(6, 0), [M3]
)