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

SQL Join Types
There are four basic types of SQL joins: inner, left, right, and full. The easiest and most intuitive way to explain the difference between these four types is by using a Venn diagram, which shows all...

Cursors In SQL Server
First thing first Usage of Cursors is not encouraged in SQL Server as they are slow. You may go with While loop if you need to iterate through a recordset. Cursor is a database object to retrieve data...

MS Access - DAO (Data Access Object)
DAO is a well-known, easy to use object model for database services, including Microsoft Jet, ODBC, and in the future, OLE DB. DAO is also multi-lingual-you can use it from VB and VBA environments, FoxPro,...

PowerPivot For Excel
PowerPivot is an add-in for Microsoft Excel 2010 that enables you to import millions of rows of data from multiple data sources into a single Excel workbook, create relationships between heterogeneous...

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