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
Structured query language-It is a language to interact with the database. Database-It is a collection of data's in the form of tables. Tables-Collection of rows and columns Rows are also called as tuples...

In which case (realtime scenario) should you think of using Different SQL JOINs (Simple tips)
Whenever you want data (columns) to be fetched from more than a single table then think of JOINS in SQL.It could be 2 or more tables.*Mostly you join using Primary key and Foreign Key1) if you want only...

What is PowerPoint?
PowerPoint is a complete presentation graphics package. It gives you everything you need to produce a professional-looking presentation. PowerPoint offers word processing, outlining, drawing, graphing,...

SQLSERVER Tips
Tips: 1. Treat SQLSERVER as you would any other programming language 2. Go with baby steps 3. Try to practice as much as you can with tables by writing queries 4. Do not get discouraged

Top 10 SQL Concepts for Job Interview
1. SELECT and FROM: This is the “heart” of any SQL query - SELECT columns FROM table.2. WHERE: This acts as a filter and allows you to select only relevant rows based on conditions.3. GROUP...
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