clear markdown compare help best fiddles feedback
clear markdown feedback
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 3601472 fiddles created (47973 in the last week).

DECLARE @V1 decimal (9, 6) = 123.456789; DECLARE @V2 decimal (7, 2) = 12345.67; SELECT [BaseType] = SQL_VARIANT_PROPERTY(@V1 + @V2, 'BaseType'), [Precision] = SQL_VARIANT_PROPERTY(@V1 + @V2, 'Precision'), [Scale] = SQL_VARIANT_PROPERTY(@V1 + @V2, 'Scale');
BaseType Precision Scale
decimal 12 6
 hidden batch(es)