Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the SQL # symbol mean and how is it used?

Can someone please explain to me what the # symbol means in MS SQL Code.

I've tried Googling it, and even searching on StackOverflow, but can't seem to find the answer.

I feel like an idiot - having one of "those" days. Please help.

like image 422
Saajid Ismail Avatar asked Jul 02 '10 13:07

Saajid Ismail


People also ask

What exactly does SQL do?

SQL is the most common language for extracting and organising data that is stored in a relational database. A database is a table that consists of rows and columns. SQL is the language of databases. It facilitates retrieving specific information from databases that are further used for analysis.

What is SQL explain with example?

An SQL SELECT statement retrieves records from a database table according to clauses (for example, FROM and WHERE ) that specify criteria. The syntax is: SELECT column1, column2 FROM table1, table2 WHERE column2='value';


1 Answers

They normally prefix temporary tables.

From the docs....

Prefix local temporary table names with single number sign (#table_name), and prefix global temporary table names with a double number sign (##table_name).

like image 84
Ed Guiness Avatar answered Sep 23 '22 08:09

Ed Guiness