SQL Server tables: what is the difference between @, # and ##?

前端 未结 6 1305
北恋
北恋 2020-11-29 20:22

In SQL Server, what is the difference between a @ table, a # table and a ## table?

6条回答
  •  一个人的身影
    2020-11-29 20:43

    #table refers to a local (visible to only the user who created it) temporary table.

    ##table refers to a global (visible to all users) temporary table.

    @variableName refers to a variable which can hold values depending on its type.

提交回复
热议问题