Global temporary tables in SQL Server

后端 未结 3 1848
灰色年华
灰色年华 2020-12-07 03:00

I have a ##table which can be accessed across all the sessions but sometimes I am getting error

There is already an object named \'##table\' in the

3条回答
  •  有刺的猬
    2020-12-07 03:10

    There is already an object named '##table' in the database.
    

    You would typically get this error if you are doing a CREATE Table statement which would obviously fail as '##table' already exists in the database.

    Seems to me that maybe at some point in your code, the CREATE TABLE logic for this global table is being invoked again leading to this error.

    Do the have the details of the exact statement that results in this error?

提交回复
热议问题