Multiple choice technology databases

What is the output? declare @d decimal select @d = 3.564636 select @d

  1. 4

  2. 3.56

  3. 3.564636

  4. 3

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

When declaring a variable as DECIMAL without specifying precision and scale in SQL Server, the default scale is 0. Therefore, assigning 3.564636 to a DECIMAL(18,0) variable results in rounding the value to the nearest integer, which is 4.