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 out put of below queries? a. select * from Emp where null = null; b. select * from Emp where 1=1;
What is Trigger?
How to change location of errorlog in SQL?
Where do you think the users names and passwords will be stored in sql server?
I am having table Title with TITLE id,Author ID, Publiser ID , table AUTHOR with Author ID, Author Name, table PUBLISER with Pub ID, Pub name Here hot to find out the publiser id who have relesed the books of patriticular author?
Hello all, I have data like :- year amt 2004 10 2005 20 2006 30 Now i want output as:- 2004 2005 2006 10 30 60 but i have to use here group by on year.So, i need a single query within that i can find.
What is a view?
what purpose does OPENXML clause have in sql server stored procedure?
on line cluster can we make if yes tell me the procedure
what is sql injection in sql server?
How to know the NAME of the Database and SIZE of the Database at the client node in Sql Server 2005
Insert syudents details in table.Current system date &time insert into joining time.How do insert?( in sysdate only return current system date how do add time?)