Home Forums RE: Question of the Day for 24 Oct 2006

  • This should answer it :

    DECLARE @a int, @b-2 int, @c int, @d int

    Select @a = 1, @b-2 = @a + 1, @c = @b-2 + 1, @d = @c + @b-2 + @a

    Select @a as a, @b-2 as b, @c as c, @d as d

     

    a           b           c           d          

    ----------- ----------- ----------- -----------

    1           2           3           6

    (1 ligne(s) affectée(s))