Answer / mohammadali.info
Temporary tables are a useful tool in SQL Server provided to allow for short term use of data. There are two types of temporary table in SQL Server, local and global.
Local temporary tables are only available to the current connection to the database for the current user and are dropped when the connection is closed. Global temporary tables are available to any connection once created, and are dropped when the last connection using it is closed.
Both types of temporary tables are created in the system database tempdb.
Temporary tables can be created like any table in SQL Server with a CREATE TABLE or SELECT..INTO statement. To make the table a local temporary table, you simply prefix the name with a (#). To make the table a global temporary table, prefix it with (##).
-- Create a local temporary table using CREATE TABLE
CREATE TABLE #myTempTable
-- Create a local temporary table using SELECT..INTO
age AS DummyField1,
lastname AS DummyField2
To make these into global temporary tables, just replace (#) with (##)
|Is This Answer Correct ?||15 Yes||2 No|
What is the SQL?????????????????????????????
Do you know what is openxml in sql server?
How to connect ms access to sql servers through odbc?
What is Check point? Explain in Brief what it will do?
What's new in sql management studio for sql server? : sql server management studio
What are the tool windows in sql server management studio? : sql server management studio
What are different replication agents and what's their purpose? : sql server replication
How to insert a new row into a table with "insert into" statements in ms sql server?
What is difference between view and materialized view?
Can we call SP inside a query?
Hi Friends, I have a table in which there are thousands of records and in city field there is NULL value for all records now i want to change that null value with distinct values in each record say delhi, bihar, agra, jaipur etc, what will be the query for that????? its not possible to update thousands of records one by one. is there any alternative ...? Plz help ... its urgent Thanx in advance
Do you know the different ddl commands in sql?