what is the difference between delete,drop and truncate
Answers were Sorted based on User's Feedback
Answer / mohammadali.info
*The DELETE command is used to remove rows from a table. A WHERE clause can be used to only remove some rows. If no WHERE condition is specified, all rows will be removed. After performing a DELETE operation you need to
COMMIT or ROLLBACK the transaction to make the change permanent or to undo it.
*TRUNCATE removes all rows from a table. The operation cannot be rolled back. As such, TRUCATE is faster and doesn't use as much undo space as a DELETE.
*The DROP command removes a table from the database. All the tables' rows,
indexes and privileges will also be removed. The operation cannot be rolled back.
*DROP and TRUNCATE are DDL commands, whereas DELETE is a DML command. Therefore DELETE operations can be rolled back (undone), while DROP and TRUNCATE operations cannot be rolled back.
IF Answer is Correct Pls give Rate
Is This Answer Correct ? | 46 Yes | 0 No |
Answer / krishna
DELETE,DROP,TRUNCTATE are to use the remove the rows from the table
DELETE: Delete is used to delete the rows from table by using where condition also and we can ROLLBACK it also
DROP: Delete rows permanently and we can not ROLLBACK it.
TRUNCATE : Delete the data not the structure means in this delete only data but structure is same
Is This Answer Correct ? | 0 Yes | 1 No |
What do you understand by user-defined function in the sql server and explain the steps to create and execute a user-defined function in the sql server?
i want table name basis on column name.
What is use of attributehierarchyenabled? : sql server analysis services, ssas
How do we know if any query is retrieving a large amount of data or very little data?
How to sort query output in descending order in ms sql server?
What is user-defined functions? What are the types of user-defined functions that can be created?
How can you see what type of locks used?
Explain how to integrate the ssrs reports in application?
How many types of dimensions are there and what are they? : sql server analysis services, ssas
what operator performs pattern matching?
how you can list all the tables in a database?
MULTICAST DELEGATES IN C#.NET WITH REAL TIME EXAMPLE