Truncate since it is DDL command
even though both these commands are related to the structure of the table...,we can regain the data when we use use drop command by use of rollback command but its not possible in the case of truncate command.
The DROP table command of SQL lets you drop a table from database . The database requires you to empty a table before you eliminate from the database. But there is a condition for dropping a table ; it must be an empty table. syntax: 1st - delete from table-name; 2nd- drop table table-name;
data table command
Suppose there are n groups and the number of tallies for the nth group is tn.Find T the grand total of the tallies. So that T = t1 + t2 + ... + tnThenthe angle of the first segment of the pie chart should be 360*t1/T degrees;the angle of the second segment of the pie chart should be 360*t2/T degrees; etc.
a data table is a table to place your observations
There are commands in database two delete data. Delete command delete the data from the table. DROP commands delete the whole table structure along with its data. To restore the deleted data we can use roll back command.There are two commands that we can use to delete the table or content of table. If we deleted wrong data by mistake , then we can restore it by using rollback command.
In Oracle, you can insert rows, update rows or delete rows from tables, but the changes are only current to your session. That means that if you insert a row in a table, no other users will be able to see it until you enter a COMMIT command. If you should enter or delete information by mistake, you have the chance to undo your changes by using the ROLLBACK command. The ROLLBACK will undo changes to data since the last COMMIT was executed.
Delete command is a DML. Syntax of delete command is delete from table_name where <>; It is to delete content of table.
rollback command can retrieve deleted data from a table, provided commit has not been performed after deleting the data. both rollback and commit are transaction control statements.
Delete column
You drop the table and the row is deleted along with it.
even though both these commands are related to the structure of the table...,we can regain the data when we use use drop command by use of rollback command but its not possible in the case of truncate command.
Remove or Revoke
The DROP table command of SQL lets you drop a table from database . The database requires you to empty a table before you eliminate from the database. But there is a condition for dropping a table ; it must be an empty table. syntax: 1st - delete from table-name; 2nd- drop table table-name;
The "drop" command is typically used in programming or databases to remove a specific element or entity. For example, in SQL, you can use the "DROP TABLE" command to delete a table from a database. It is important to use this command carefully, as it permanently deletes the specified object.
TRUNCATE and DELETE: It also removes the rows from the specified location in the query like DELETE command, but the only difference is : 1. rows once u truncated cnnot be ROLLBACKED like in DELETE. 2. which ROLLBACK can be possible with delete. 3. Truncate is used for HUGE databases or tables bcz it works efficiently. 4. DELETE will work efficiently on small data(tables). Now it is vident that the only difference between TRUNCATE and DELETE is efficiency(i.e,Accessing Speed). Annapurna. TRUNCATE REMOVES ALL THE ROWS FROM THE TABLE AND CANNOT BE Rollbacked, while delete removes all/specific rows from table and can be rollbacked. Also truncate resets the high water mark. A common misconception is that they do the same thing. Not so. In fact, there are many differences between the two. DELETE is a logged operation on a per row basis. This means that the deletion of each row gets logged and physically deleted. You can DELETE any row that will not violate a constraint, while leaving the foreign key or any other contraint in place. TRUNCATE is also a logged operation, but in a different way. TRUNCATE logs the deallocation of the data pages in which the data exists. The deallocation of data pages means that your data rows still actually exist in the data pages, but the extents have been marked as empty for reuse. This is what makes TRUNCATE a faster operation to perform over DELETE. You cannot TRUNCATE a table that has any foreign key constraints. You will have to remove the contraints, TRUNCATE the table, and reapply the contraints. The difference between the two is that the truncate command is a DDL operation and just moves the high water mark and produces a now rollback. The delete command, on the other hand, is a DML operation, which will produce a rollback and thus take longer to complete. Truncate can be rollbacked,, basically i see lot of aritcles which says it can rollback,, but the truth is that we can rollback after trancate ,, difference is that in truncate only deallocation of the data page is done, but in delete the it is logged in deleted table and is physically removed from data page,,, Harishjan The difference is with operation on memory because if you want to have a place in memory for a later use you should use delete but if you want clear memory you should use truncate - this function clears the value and place where this value was stored. For more detailed explanation about this topic please read the following article. http://www.sqlservercentral.com/articles/delete/61387/
It would suggest to me that since you didn't put a WHERE clause, it would delete all rows in the table.