Global temp tables can be accessed by one or more sessions. This important feature of SQL Server becomes more important than it was in my programming live since more applications I worked with and am currently working on have parallel processing involved heavily. Very often, amount of data generated from one sessioin are shared to many concurrent sessions. Global temp tables come and play. Creating a global temp table is simple.
create table ##temp(i int)
It will be released when
- It’s explicitly removed by any sessions
- The creator session closed and there is no other sessions referencing this session.
DevTeach