Temporary tables are divided into:
Local temporary table, limited to the current visitor access, the creation method goes as follows:
CREATE table #TableName (table structure)
stored in database tempdb (hard disk), current user disconnects (put current), automatically deleted
If you are continuing to open a connection in use and do not need the temporary table, do this: drop table #TableName
Global temp table, all Access user access, create methods to go as follows:
CREATE TABLE # #TableName (table structure)
stored in database tempdb, automatically deleted when all access users are disconnected
Delete statement: drop table # #TableName
Note: Each SQL Server Open tab is a connection, and when the tab to create a temporary table is closed, the current user is disconnected
Differences between a user temporary table and a global temporary table in SQL Server