DELETE
1. DELETE is a DML statement.
2. DELETE removes some rows if WHERE clause is used
3. Can be rolled back
4. Can be used with or without WHERE clause
5. Does not reset identity of the table
6. Triggers will be fired.
7. When DELETE operation is performed, all the data get copied into Rollback Tablespace first,
and then delete operation get performed. Hence we can get back the data by ROLLBACK command.
SYNTAX:
To delete a particular row
DELETE FROM table_name
WHERE column_name = column_value
To delete all rows
DELETE FROM table_name
Or
DELETE * FROM table_name
DROP
1. DROP is a DDL statement.
2. Removes a table from the database. Table structures, indexes, privileges, constraints will
also be removed.
3. Cannot be rolled back
4. No Triggers will be fired.
SYNTAX:
DROP TABLE table_name
TRUNCATE
1. TRUNCATE is a DDL Statement.
2. Removes all rows from a table, but the table structures and its columns, constraints, indexes
remains.
3. Cannot be rolled back
4. Resets the identity of the table
5. Truncate is faster and uses fewer system and transaction log than delete.
6. Cannot use TRUNCATE on a table referenced by a FOREIGN KEY constraint.
7. No Triggers will be fired.
8. Cannot use WHERE conditions
SYNTAX:
TRUNCATE TABLE table_name
1. DELETE is a DML statement.
2. DELETE removes some rows if WHERE clause is used
3. Can be rolled back
4. Can be used with or without WHERE clause
5. Does not reset identity of the table
6. Triggers will be fired.
7. When DELETE operation is performed, all the data get copied into Rollback Tablespace first,
and then delete operation get performed. Hence we can get back the data by ROLLBACK command.
SYNTAX:
To delete a particular row
DELETE FROM table_name
WHERE column_name = column_value
To delete all rows
DELETE FROM table_name
Or
DELETE * FROM table_name
DROP
1. DROP is a DDL statement.
2. Removes a table from the database. Table structures, indexes, privileges, constraints will
also be removed.
3. Cannot be rolled back
4. No Triggers will be fired.
SYNTAX:
DROP TABLE table_name
TRUNCATE
1. TRUNCATE is a DDL Statement.
2. Removes all rows from a table, but the table structures and its columns, constraints, indexes
remains.
3. Cannot be rolled back
4. Resets the identity of the table
5. Truncate is faster and uses fewer system and transaction log than delete.
6. Cannot use TRUNCATE on a table referenced by a FOREIGN KEY constraint.
7. No Triggers will be fired.
8. Cannot use WHERE conditions
SYNTAX:
TRUNCATE TABLE table_name
21 comments:
it's very clear and useful
very useful...Thanks...
I really like your blog.. very nice colors & theme. Did you create this website yourself
or did you hire someone to do it for you? Plz answer back as I'm looking to construct my own blog and would like to find out where u got this from. cheers
Feel free to surf to my web-site - mouse click the following webpage
Or maybe you look at it from a monetary standpoint and decide that Guy
Ritchie and Madonna divorce was worse because they were married
so long and have children and there is a lot of money involved.
Aamir Khan and Amitabh Bachchan had a rough battle, when
the movies related to them were released at the same time.
However, today, the wedding photographers capture photographs of moments that
are precious and that you would cherish all your life; and, when you least expects the wedding photographer to capture
you.
Check out my web page; watchmygames.com
You will find the most updated news being uploaded or published in blogs and
celeb news sites. Stay connected with for the latest
tit-bits of pick me up news and cool celebrity pictures.
Celebritynewsapp has developed a celebrity app which is getting popular day by day.
Feel free to visit my web-site: profitbusinessathome.net
I think it is best answer comparing to all other on internet...
You have made some decent points there. I checked on the net to learn more about the issue and
found most individuals will go along with your views on this site.
My site ... http://ip-50-62-224-156.ip.secureserver.net
I used to be able to find good info from your articles.
Review my weblog :: www.50.co.za
Great tutorial. One more difference between truncate and delete is that truncate is DDL.
Oh my God this site is really good
thanks alot for nice post
Thanks
thanks
good with thanks
3
Good ...........Keep on.........Very helpful
moda ra
useful me
Nice post, TRUNCATE statements required a metadata grip to execute. http://sqltechtips.blogspot.in/2015/10/truncate-delete-and-drop-in-sql.html
retro jordans
nike kd 11
golden goose sneakers
ralph lauren uk
supreme clothing
louboutin
air max 90
moncler outlet
bape hoodie
yeezy boost 350