I'm used to seeing temporary tables created with the hash / number character, for example:
CREATE TABLE
However, I recently met a stored procedure code that indicates the name of the schema when creating temporary tables, for example:
CREATE TABLE [dbo].[#Test] ( [Id] INT )
Is there a reason you would like to do this? If you specified only the default user schema, doesn't it matter? Does this apply to the [dbo]
in the local database or tempdb database?
source share