Declaring table variables-Is this working as designed or is this a quirk or is this a a bug?

  • I am surprised that the first set of statements work but the second set do not.

    Is this working as designed or is this a quirk or is this a a bug?

    DECLARE @test-2 char(1)

    DECLARE @testtable TABLE (Test char(1))

    DECLARE

    @test-2 char(1),

    @testtable TABLE (Test char(1))

  • Looks like each table variable needs to be declared separately, just like creating tables.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply