Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the "#" symbol in TSQL mean?

Tags:

tsql

Or "octothorpe" for the pedants :)

Google says "non-sharable temp table" but I don't know what that means. Any clarification would be helpful.

Thanks

like image 612
Jason Avatar asked Sep 30 '10 19:09

Jason


People also ask

What does the fox say Meaning?

Speaking of the meaning of the song, Vegard characterizes it as coming from "a genuine wonder of what the fox says, because we didn't know". Although interpreted by some commentators as a reference to the furry fandom, the brothers have stated they did not know about its existence when producing "The Fox".

What does a real fox say?

One of the most common fox vocalizations is a raspy bark. Scientists believe foxes use this barking sound to identify themselves and communicate with other foxes. Another eerie fox vocalization is a type of high-pitched howl that's almost like a scream.

How can I find a song by the sound?

On your phone, touch and hold the Home button or say "Hey Google." Ask "What's this song?" Play a song or hum, whistle, or sing the melody of a song. Hum, whistle, or sing: Google Assistant will identify potential matches for the song.


2 Answers

It creates a temp table that is visible to the current scope, and can't be accessed across logins. It gets cleaned up once it's out of scope (i.e. the stored proc is finished running).

If you define a temp table with "##", it is global, and can be accessed across sessions.

like image 104
Guy Starbuck Avatar answered Oct 29 '22 06:10

Guy Starbuck


It creates a temporary table that can only be accessed during the current session (login).

You can also create global temporary tables that are accessible across all connections by prefixing the table name with ##.

See here for more details.

like image 33
Oded Avatar answered Oct 29 '22 08:10

Oded