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   SiteMap shows list of All Categories in this site.
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 Drop and Truncate
 Question Submitted By :: Nagireddy.sn
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the difference between Drop and Truncate
Answer
# 1
Drop means removing.Removing the existence.

Truncate - there is no log maintained for the deleted
records.As when we perform delete a log is maintained a slow
process.
 
Is This Answer Correct ?    4 Yes 2 No
Mayur Jain
 
  Re: What is the difference between Drop and Truncate
Answer
# 2
Drop means removing the existing object from the database.
turncate means you are deleting the data from the table and 
oracle implicitly issues commit statment and even when you 
say rollback , you won't get the data back due to commit ..
 
Is This Answer Correct ?    6 Yes 3 No
Mohsin Mohammed Abdul
 
 
 
  Re: What is the difference between Drop and Truncate
Answer
# 3
Drop will delete all the existing structure. if it applies 
to a table, Truncate will delete only the data while 
keeping the structure of the table as it is.
 
Is This Answer Correct ?    8 Yes 0 No
Pavan
 
  Re: What is the difference between Drop and Truncate
Answer
# 4
Drop and Truncate commands both are DML commands.
If we use drop command it will deletes all the table data 
as well as tablestructure.But if we use truncate command it 
will deletes the table data only.
 
Is This Answer Correct ?    5 Yes 6 No
Satyanarayana
 
  Re: What is the difference between Drop and Truncate
Answer
# 5
TRUNCATE: Only data is deleted structure of the table 
exists.


DROP:  Both data and structure of the table gets removed.
 
Is This Answer Correct ?    8 Yes 1 No
Koti-khammam
 
  Re: What is the difference between Drop and Truncate
Answer
# 6
DROP means it's drop the table(with rows,Pk_key, Fk_key and 
indexces)from the database.
TRUNCATE do the same as DROP but maintain the Pk_key, 
Fk_key and indexces declaration only remove rows.

---by suman kalyan betal (suman_kal@rediffmail.com)
 
Is This Answer Correct ?    2 Yes 0 No
Suman Kalyan Betal
 
  Re: What is the difference between Drop and Truncate
Answer
# 7
Drop can be used to drop the entire table including data 
and structure of table where as truncate removes rows from 
table but the structure of table remains as it is.
 
Is This Answer Correct ?    3 Yes 0 No
Lakshmi
 
  Re: What is the difference between Drop and Truncate
Answer
# 8
both are ddl commands.Drop deletes the table with schema 
and records but truncate deletes only records.Drop can be 
roll back but not truncate.
 
Is This Answer Correct ?    2 Yes 1 No
Antim
 
  Re: What is the difference between Drop and Truncate
Answer
# 9
Truncate removes data permanently while drop does not,we 
can rollback in case of drop.

Triggers does not get fired , in case of truncate ,but in 
drop it gets fired.
truncate is much faster than drop
 
Is This Answer Correct ?    1 Yes 2 No
Manisha
 
  Re: What is the difference between Drop and Truncate
Answer
# 10
drop will remove the entire table from the database and can
be rollbacked.

truncate will remove the content of the table and it cannot
be rollbacked.

truncate is little bit faster than drop.
 
Is This Answer Correct ?    0 Yes 1 No
Swathi
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
What is the difference between local table and global table Polaris1
what is the main difference between constraints(like primary key etc..)& joins? Annik2
hi, how to match retrieve the unmatched records from 2 tables in which we dont have any primary key. example : table1 has 1,2,3,4,5 and table2 has 1,2,3,4,5,6,7,8,9,10 and i want the numbers from 6 to 10 to be displayed and should not come as null. i need the numbers. please reply as soon as possible.  2
What is the differecne between equi-join and inner-join and natural join..Is there any difference or all are same? Microsoft2
What is the role that is required for killing a process What is the role that is required for creating a linked server IBM1
Can you link only other SQL Servers or any database servers such as Oracle?  1
How to write stored procedure to update the data in 10 tables  4
What is the difference between OLEDB and ODBC CFCI3
How to select nth record from a table? DELL9
If you are working on a SQL database and if suddenly a developer changes the code and your queries results start giving errors,how will you check using a T-SQL query (on system tables) that what has changed in the database. Microsoft2
Which stored procedure will you be running to add a linked server?  1
WRITE A FUNCTION TO DISPLAY THE OUTPUT OF AN EXISTING TABLE RANGE LIKE COMMAM SEPERATED VALUES LIKE RANGE1,RANGE2,... TVS2
Can you give an example of Stored Procedure?  2
A table contains list of customers and his city with other details. Each customer has a unique number and the table consists millions of data. Query is: I want to retrieve 10 customers from each city, no script, only from single query? Infosys3
Display a roll having miminum marks in two subjects? Patni7
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?  3
Can I know,how to Execute Funcion and Trigger through command(Manualy Execution) in MS SQL/SERVER 2005,give me answer with Example.  1
What r sql reporting services and analysis services? how can we use it. Microsoft2
what is Constraint? How many types of constraints in SQL ? NIIT7
What are different types of Keys? Please explain all the keys with a suitable example.  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