.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Santhakumar Munuswamy
Fauzul Azmi
Asad Ali

Home >> Interview Question >> Sql Server >> Post New Question Subscribe to Interview Questions

what is the advantages of using temporary table in SQLServer

Posted By :Ravi Ranjan Kumar     Posted Date :July 31, 2011    Points :40   Category :Sql Server 
Its have some major advantages like
a)Temporary table decrease the amount of locking and logging
b)Temporary table improves performance.
c) Table gets cleared up automatically when current procedure goes out of scope
d) Temporary table makes the complex logic simple.
e) Temporary table cache Intermediate results.

You can also find related Interview Question to what is the advantages of using temporary table in SQLServer  below: 

Write a SQL query to send mail, whenever a new record is inserted into a table using Sqlserver 2000.

Here we have to create a trigger on required table as show below.

ON TableX

EXEC master..xp_sendmail
@message = 'body'
@subject = 'foo was fired.'

How many Primary key in single table in sqlserver?

Primary key Restrict Duplicate Values and Null values .Each Table can have only one primary ..

Create table emp(empid int constraint pk_empid primary key(empid),empname varchar(90))

www.databaseresource.blogspot.com (More...)

What are the privileges that can be granted on a table by a user to others?

Insert, update, delete, select, references, index, execute, alter, all (More...)

What command is used to create a table by copying the structure of another table?


Explanation :

To copy only the structure, the WHERE clause of the SELECT command should contain a FALSE statement as in the following.
If the WHERE condition is true, then all the rows or rows satisfying the condition will be copied to the new table. (More...)

Advantages of DBMS?

1.Redundancy is controlled.
2.Unauthorised access is restricted.
3.Providing multiple user interfaces.
4.Enforcing integrity constraints.
5.Providing backup and recovery. (More...)

Advantages of Crystal Reports ?

Advantages of Crystal Reports :

Some of the major advantages of using Crystal Reports are:

1. Rapid report development since the designer interface would ease the coding work for the programmer.

2. Can extend it to complicated reports with interactive charts and enhance the understanding of the business model

3. Exposes a report object model, can interact with other controls on the ASP.NET Web form

4. Can programmatically export the reports into widely used formats like .pdf, .doc, .xls, .html and .rtf (More...)

How to get a row was inserted most recently in a table?

select top 1 * from tablename order by ColumnName desc (More...)

How To Update Description Value for a Column in Table using SQL Command?

We can Update Description to Column using sp_updateextendedproperty System Store Procedure.
Sample Command to Update Description for Column in a Table:

EXEC sys.sp_updateextendedproperty @name=N'MS_Description', @value=N'My Description for Column Here' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MyTableName', @level2type=N'COLUMN',@level2name=N'ColumnName' (More...)

How To Delete Description Value for a Column in Table using SQL Command?

We can Delete Description from Column using sp_dropextendedproperty System Store Procedure.
Sample Command to Delete Description from Column in a Table:

EXEC sys.sp_dropextendedproperty @name=N'MS_Description', @value=N'My Description for Column Here' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MyTableName', @level2type=N'COLUMN',@level2name=N'ColumnName' (More...)

How To Get Description Value for all Column in Table using SQL Command?

To Get Description of Columns we need to use system function sys.fn_listextendedproperty.
Command To Get Description Data for all Columns:

SELECT * FROM fn_listextendedproperty(NULL, 'SCHEMA',
'dbo', 'TABLE', 'YourTable Name Here', 'COLUMN', NULL) (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend