UrbanPro
true

Learn MS SQL from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Truncate, Drop And Delete Commands In SQL

Umasankar Natarajan
07/07/2017 0 0

Truncate:

  • Truncate command will delete the Table data only, it keeps the table schema as it is.
  • Table data Can be rollback
  • Example : TRUNCATE TABLE User;

Drop:

  • Drop command will delete both Table data table schema.
  • Table data Can be rollback
  • Example : DROP TABLE User;

Delete:

  • Delete command will delete the particular row based on the criteria in Where clause. If where clause is not mention in the squre, it will delete entire data, that is equalent to Truncate command action.
  • Once delete the data, data can not be rollback. Make sure to include where clause in the delete query.
  • Example : DELETE FROM User WHERE userid = 5;

Note: This concept will work only for MS SQL. It may be different or reverse in oracle sql and MySQL

0 Dislike
Follow 0

Please Enter a comment

Submit

Other Lessons for You


MS-SQL Database
1. Select: 01-Select All Given a City table, whose fields are described as: +-------------+----------+ | Field | Type | +-------------+----------+ | ID | int(11) | | Name ...

Looping In Oracle SQL Using Level
We will see about the syntax LEVEL in Oracle sql. If we want to loop through and print a set of values in SQL, LEVEL could come handy. Example query: SELECT 'hi', LEVEL FROM DUALCONNECT BY LEVEL <=...

HTML (Hypertext Markup Language)
HTML (Hypertext Markup Language) is the set of markup symbols or codes inserted in a file intended for display on a World Wide Web browser page. The markup tells the Web browser how to display a Web page's...

X

Looking for MS SQL Classes?

The best tutors for MS SQL Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn MS SQL with the Best Tutors

The best Tutors for MS SQL Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more