ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
What is the difference between truncate and delete statement?
 Question Submitted By :: Madhukar Subbarayan
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the difference between truncate and delete statement?
Answer
# 1
Both Truncate and delete deletes the rows from a table . 
But we cant use where clause in truncate statement . While 
doing delete operation all the deleted rows are logged in 
the transaction log . It reduces the perfomance . In 
truncate operation no transaction logging is happening . 
Delete is Autocommited but Truncate is Not .
 
Is This Answer Correct ?    3 Yes 1 No
Sreejith S T
 
  Re: What is the difference between truncate and delete statement?
Answer
# 2
Truncate deletes all rows from table. But Delete deletes 
row/rows by condition.
 
Is This Answer Correct ?    0 Yes 0 No
Rajiv Singh
 
 
 
  Re: What is the difference between truncate and delete statement?
Answer
# 3
truncate delete all records from the table and it is auto 
commit. We can't able to rollback the data after performing 
truncate operation.

delete statement delete the specific or all records from 
the table. But we can able to rollback the deleted record
 
Is This Answer Correct ?    2 Yes 0 No
Valarmathi
 
  Re: What is the difference between truncate and delete statement?
Answer
# 4
truncate deletes records from a table and while truncating a
table, the table will be dropped from the database and will
again be created automatically. No where clause is
acceptable in truncate statement and one can't restore the
previous data (i.e no rollback is possible) into the table.
It's an efficient process.

Delete statement will delete a particular row(s) on your
choice.
 
Is This Answer Correct ?    1 Yes 0 No
Ismail Hasan
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
Define candidate key, alternate key, composite key.  9
SYNTAX FOR VIEWS WITH EXAMPLE HOW TO LINK TWO TABLES Microsoft1
Explain DBMS, RDBMS?  4
what is Data Transformation Services (DTS) ?can u explain me in detail? TCS5
wat will be the sql query to extract only last 3 records from table supose table hving thousands for records  16
how to dispaly a particular row details from a given table  1
How to find the date and time of last updated table?  3
What is de-normalization and when do you do it?  3
employee table has employee id ----------- empid ---------------- 1 2 3 3 3 4 5 5 5 6 6 6 7 here the values r repeated two times.how to select the repeated values only.i.e 3,5,6 should alone come.  2
About DTS usage ? Cognizent2
What is the purpose of using COLLATE in a query?  1
How to delete particular value in the column of a table.Is it possible or not?if possible give it as in query.  4
What are the all different types of Joins in SQL Server 2000, Anybody can explain each join with definition..Thanks in advance.... Siemens6
How do you read transaction logs  1
What is a transaction and what are ACID properties?  2
how to implement locking in sql server Satyam1
what are the joins,primary key,foriegn key, candidate key, super key and expain them? Polaris2
how to connect sybase to sql server 2005?. ABC1
Hi Can any one tell me the Good institute to learn SQL esp for Data Base Testing or SQL from scratch to the proficiency level in Hyederabad and facult also. Thankyou well in advance  6
How To Change Column Ordinal Position in SQL Server 2005 using Query i.e I Want To Add Column at Particular Ordinal Position in SQL Server 2005  2
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com