If I delete a table and then rollback it, do the index on
the table remains?
What if I drop the table and roll back?Do index on the
table remains?
What if I truncate the table and roll back? Do the index on
the table remains

Answer Posted / dinesh kumar

DDL COMMANDS HAVE AUTO COMMIT ....
DML COMMANDS DOES NOT HAVE AUTO COMMIT FEATURE...
SO IF WE USE "DELETE" THE STRUCTURE AND THE TABLE INDEX ARE NOT DELETD, BUT THE RECORDS ARE DELETED...

NOW IF WE USE "ROLLBACK" ALL THE RECORDS ARE GETTING BACK...

IF WE USE "DROP" ALL THE RECORDS+INDEX+STRUCTURE DELETED.
NOW WE USE "ROLLBACK" NO USE OF IT. BECAUSE AFTER EXECUTING THIS COMMAND SQL ENGINE PERFORMS "COMMIT" OPERATION.

IF WE USE "TRUNCATE" ALL THE RECORDS ARE ONLY DELETED . NOT THE STRUCTURE AND INDEX .. THIS IS ALSO DDL SO SQL ENGINE PERFORMS "COMMIT" OPERATION AFTER EXECUTING THIS COMMAND.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is indexing in database with example?

574


Can you explain the 'between' clause?

646


What is dbms and its functions?

595


What are different types of transaction isolation levels?

576


How many types of data are there?

576






What is query in database?

586


Who is end user in database?

545


Explain the Logical Schema of Database

651


What is the 3-tier architecture?

584


What are the types of tables in database?

547


What are the properties of a primary key in DBMS?

585


Which two statements are true about a foreign key?

606


What are the three levels of data abstraction?

643


What is big data in database?

548


Can you explain the select into statement?

610