difference between truncate and delete ,drop?

Answers were Sorted based on User's Feedback



difference between truncate and delete ,drop?..

Answer / ashu singh

Drop deletes the table along with its structure from the database.
Delete command deletes the records from the table and it also deletes the table space allocated in the database.

Truncate is similar to Delete but it does not delete the table space from the database.

Drop and Truncate are the DDL command hence can't be rolled back whereas Delete is a DML command and can be rolled back.

Is This Answer Correct ?    13 Yes 2 No

difference between truncate and delete ,drop?..

Answer / surendra

truncate

it deletes only the records from the table
it doesn't delete the structure of the table
we cannot rollback it
we cannot delete a particular record from the table
it is ddl

drop

it deletes the records as well as structure of the table too
we cannot rollback the records
we can flashback the table from the version 9x
it is ddl

delete

it deletes the only records which are we mention in the where clause or whole records
it is dml
we can rollback it

Is This Answer Correct ?    3 Yes 2 No

difference between truncate and delete ,drop?..

Answer / sachin

the main difference between delete and truncate is that in
the truncate u will delete all the values from the table as
well as from the data dictionaries also while delete is used
to delete selected values and in the same way drop is use
to delete whole data from a table but the deleted data will
occupy the memory space in the extents but if we perform
truncate then the extents are free from the deleted data .....

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Oracle General Interview Questions

What is a view and how is it different from a table?

0 Answers  


What is a trigger and what are its types?

0 Answers  


How to create an initialization parameter file?

0 Answers  


What is an Oracle index?

0 Answers  


Can group functions be used in the order by clause in oracle?

0 Answers  






How to restrict the duplicate records in table valuesets

2 Answers   IBM,


What privilege is needed for a user to create views in oracle?

0 Answers  


How to check the server version in oracle?

0 Answers  


What is catalog in Oracle?

0 Answers   MCN Solutions,


What is the max number of columns in an oracle table?

0 Answers  


Can the query output be sorted by multiple columns in oracle?

0 Answers  


Explain coalesce function?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)