Results 1 to 7 of 7
Thread: deleate truncate and drop
-
11-09-2011, 12:00 AM #1
Sophomore
- Join Date
- Jul 2011
- Location
- Hamburg
- Posts
- 125
- Thanks
- 0
- Thanked 0 Times in 0 Posts
- Feedback Score
- 0
deleate truncate and drop
Hi All
can u share with me deleate truncate and drop funda?
-
01-15-2012, 02:38 AM #2
Freshman
- Join Date
- Dec 2011
- Posts
- 20
- Thanks
- 0
- Thanked 0 Times in 0 Posts
- Feedback Score
- 0
delete * from table_name
drop table_name
-
01-18-2012, 05:16 AM #3
Freshman
- Join Date
- Dec 2011
- Posts
- 20
- Thanks
- 0
- Thanked 0 Times in 0 Posts
- Feedback Score
- 0
drop table table_name
-
01-21-2012, 05:40 AM #4
Junior
- Join Date
- Dec 2010
- Location
- India
- Posts
- 384
- Thanks
- 2
- Thanked 1 Time in 1 Post
- Feedback Score
- 0
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.
TRUNCATE removes all rows from a table. The operation cannot be rolled back and no triggers will be fired. As such, TRUCATE is faster and doesn't use as much undo space as a DELETE.
TRUNCATE is much faster than DELETE.Tanisha Systems Inc Search Engine Optimization Tutorial Read More: SEO Tutorial | Tanisha Systems | Tanisha Systems Review Looking life partner: matrimony sites
-
03-23-2012, 04:15 AM #5
Sophomore
- Join Date
- Mar 2012
- Posts
- 144
- Thanks
- 0
- Thanked 1 Time in 1 Post
- Feedback Score
- 0
Delet Command is used to remove only record and when ever you add the record then next id is start previous next one.but truncate remove all record and autoincrement start 1 ....Drop Commend is used to drop the all strucate of table....
-
03-16-2013, 08:50 AM #6
1>TRUNCATE is a DDL command whereas DELETE is a DML command.
2>TRUNCATE is much faster than DELETE.
Reason:When you type DELETE.all the data get copied into the Rollback Tablespace first.then delete operation get performed.Thatswhy when you type ROLLBACK after deleting a table ,you can get back the data(The system get it for you from the Rollback Tablespace).All this process take time.But when you type TRUNCATE,it removes data directly without copying it into the Rollback Tablespace.Thatswhy TRUNCATE is faster.Once you Truncate you cann't get back the data.
3>You cann't rollback in TRUNCATE but in DELETE you can rollback.TRUNCATE removes the record permanently.
4>In case of TRUNCATE ,Trigger doesn't get fired.But in DML commands like DELETE .Trigger get fired.
5>You cann't use conditions(WHERE clause) in TRUNCATE.But in DELETE you can write conditions using WHERE clause
-
04-29-2013, 09:08 AM #7
Freshman
- Join Date
- Apr 2013
- Location
- canada
- Posts
- 35
- Thanks
- 0
- Thanked 0 Times in 0 Posts
- Feedback Score
- 0
Thanks guys for the post and it has helped me a lot to understand about the terms and how i can use it in SQL.
Similar Threads
-
Truncate MS SQL 2008 Database Log File
By manik in forum DatabasesReplies: 5Last Post: 05-22-2013, 04:39 AM -
Drop-Down Menus
By 99ermikeb in forum Computer and TechReplies: 0Last Post: 09-07-2011, 05:29 PM -
What is the reason for Drop down in my Backlink?
By techzarinfo in forum Search Engine OptimizationReplies: 11Last Post: 03-29-2011, 02:17 AM -
FAQ Drop Down script
By JavaScriptBank in forum JavaScript & AJAXReplies: 0Last Post: 04-15-2010, 11:35 AM -
Sudden drop in PR
By Rajshree in forum GoogleReplies: 9Last Post: 04-12-2010, 06:53 AM



Reply With Quote

