Permissions in SQL

In Microsoft SQL Server, a temporary table is specified with a # prefix character:

CREATE TABLE #myTable(col1 int not null);

Such a table is only accessible/visible in the session that created it. A global temporary table uses ## prefix:

CREATE TABLE ##globalTable(col2 int not null);

The global temp table can be accessed by another session. Both types of temporary tables are automatically destroyed when all sessions that accessed them terminate.

The single # temporary table would meet your read-only needs, no one else can access it. Any table created without a # or ## prefix is not a temporary table, and has the accessibility that @ScottPletcher described.

1 Like