difference between truncate and delete ,drop?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
There is a big table with "n" of rows and 40 + columns .It doesn't have primary key.How do you select the primary key. In other words how do you get the duplicate records.
what is the syntax of UPDATE command?
What are the types of trigger in oracle?
Please explain drop constraint oracle?
3. Adapt your query in (2) above so that only post codes with more than twenty orders are displayed.
How can one skip any number of rows while loading the DB tables with SQL Loader? Similarly how can one skip any column?
What are a collation and state the different types of collation sensitivity?
One Table having two rows with one colomn having values Like"Male" and "Female". how to upadte these values Like "Female" and "Male" in single update statement.
After using set unused can we enable the column again to use? Please give me some answers....
In Oracle Clinical 4.5.0, can the VIEW_TEMPLATE_ID column in DATA_EXTRACT_VIEWS table contain NULL value?
How many types of segments in Oracle?
How to count groups returned with the group by clause in oracle?