What is a temp table? how to denote temp table?

Answer Posted / jayakumar

Temporary tables are created in the tempdb database. To
create a temporary table, you must have created table
permission in tempdb.
You can create temp tables in 2 ways :
1. Create table #tablename
2. Create table tempdb..tablename

a).If you create the table as per the above mentioned ways,
the table will get dropped automatically when the
session/procedure ends or you drop it manually.
b).If you don’t use the above mentioned ways and use
only "create table table name" command in tempdb the table
will stay there as long as you drop in manually.
c).If you create a table in any other database other than
tempdb, it will not be a temp table.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sybase replication server?

536


Explain relationship between jdbc and sybase.

509


What is an advantage to using a stored procedure as opposed to passing an sql query from an application ?

534


Differentiate between replication server and sql remote?

471


What are triggers? Why do we use them? Diff types of triggers? What are magic tables?

489






Is there any advantage of last_name varchar(50) over this last_name varchar(255)?

566


How to start sybase database in windows?

589


What are the operating systems in which sybase could take its presence?

478


Explain update statistics.

498


How do I configure the burn factor in sybase?

459


What is the timestamp datatype in sybase?

464


What is raid and sybase?

515


How to save space when inserting rows monotonically?

453


How do I choose which tables to partition in sybase?

445


What is the relationship between jdbc and sybase?

489