Lets Viz Technologies Logo
Home
Dashboards
Contact
Get Demo
Lets Viz

Custom Gen AI + BI Solutions to Automate Workflows and Unlock Insights. We help businesses automate repetitive processes and gain real-time insights through AI-driven workflows and intelligent dashboards.

Company

  • About
  • Careers
  • Contact

Services

  • AI Automation
  • Custom Dashboards
  • BI Consulting
  • IT Outstaffing

Dashboards

  • Finance
  • Marketing
  • Sales
  • Operations

Learn

  • Blog
  • Tech Tutorials

Legal & Social

  • Privacy Policy
  • Terms & Conditions

Contact Us

Location

Noida, Uttar Pradesh 201301
WeWork Berger Delhi One, C-001/A2, Sector 16B

Phone

+91 0124 502 5592

Email

info@lets-viz.com

Review Us On

Clutch logoTrustpilot logoGoogle Reviews logo

© 2026 Lets Viz Technologies. All rights reserved.

Dashboard

SQL – DELETE Statement

SQL – DELETE Statement
December 28, 2022·By Lets Viz·2 min read
DashboardReporting

In the DELETE statement in SQL,  it deletes the existing records from the table. It is operated using a condition in the WHERE clause. The condition in the where clause determines which records are going to be deleted. The WHERE clause is necessary because if the clause gets omitted, then all the records from the table get deleted as the WHERE clause determines which record needs to be deleted.

  • Syntax of DELETE statement –

DELETE FROM table_name WHERE condition ;

 

Demo Table –

Sales Order Table

Order date

Region

Rep

Item

Units

Unit Cost

Total

2021-01-23 00:00:00.000

Central

Kivell

Binder

50

19.99

999.5

2021-02-26 00:00:00.000

Central

Gill

Pen

27

19.99

539.73

2021-04-01 00:00:00.000

East

Jones

Binder

60

4.99

299.4

2021-06-08 00:00:00.000

East

Jones

Binder

60

8.99

539.4

2021-07-12 00:00:00.000

East

Howard

Binder

29

1.99

57.71

2021-07-29 00:00:00.000

East

Parent

Binder

81

19.99

1619.19

2021-09-01 00:00:00.000

Central

Smith

Desk

2

125

250

2021-09-18 00:00:00.000

East

Jones

Pen Set

16

15.99

255.84

2021-10-05 00:00:00.000

Central

Morgan

Binder

28

8.99

251.72

2021-10-22 00:00:00.000

East

Jones

Pen

64

8.99

575.36

 

Example – Consider the Sales Order table of the Customer database where we want to DELETE those records that have an order item as a pencil.

DELETE FROM [dbo].[SalesOrders] WHERE Item = 'Pen';

 

This output is the small section of the output by executing the above query –

Order date

Region

Rep

Item

Units

Unit_cost

Total

2021-01-23 00:00:00.000

Central

Kivell

Binder

50

19.99

999.5

2021-04-01 00:00:00.000

East

Jones

Binder

60

4.99

299.4

2021-06-08 00:00:00.000

East

Jones

Binder

60

8.99

539.4

2021-07-12 00:00:00.000

East

Howard

Binder

29

1.99

57.71

2021-07-29 00:00:00.000

East

Parent

Binder

81

19.99

1619.19

2021-09-01 00:00:00.000

Central

Smith

Desk

2

125

250

2021-09-18 00:00:00.000

East

Jones

Pen Set

16

15.99

255.84

2021-10-05 00:00:00.000

Central

Morgan

Binder

28

8.99

251.72

2021-11-25 00:00:00.000

Central

Kivell

Pen Set

96

4.99

479.04

2021-12-29 00:00:00.000

East

Parent

Pen Set

74

15.99

1183.26

As we can see in the results, the records that have “Pen” as their item got deleted, But the whole record didn’t get deleted as we had a condition in the WHERE clause.

Other SQL topics to check out:

  • How to write SQL Select Statements
  • Introduction to SQL for Data Scientists
  • What is RDBMS (Relational Database Management System)?
  • SQL WHERE Clause

Follow us on Twitter, Facebook, Linkedin, and Tableau Public to stay updated with our latest blog and what’s new in Tableau.

Automate data analysis pipeline and create report ready dashboards

If you are looking forward to getting your data pipeline built and setting up the dashboard for business intelligence, book a call now from here.

#analytics #data #business #artificialintelligence #machinelearning #startup #deeplearning #deeplearning #datascience #ai #growth #dataanalytics #india #datascientist #powerbi #dataanalysis #tableau #SQL #businessanalytics #businessanalyst #businessandmanagement #dataanalyst #businessanalysis #analyst #analysis #powerbideveloper #powerbidesktop #letsviz

Related blogs

Executive Dashboard Best Practices: How to Design Dashboards Leaders Actually Use
Dashboard
Executive Dashboard Best Practices: How to Design Dashboards Leaders Actually Use

TL;DR: An executive dashboard must deliver clarity, context, and confidence — fast. The best executive dashboards focus on business outcomes, not just metrics. Follow these best practices: align KPIs with...

Data AnalyticsKPIReporting
6 min read
Read More
Data Quality that Scales: 12 Tests to Add Before Any Power BI Dashboard Goes Live
Dashboard
Data Quality that Scales: 12 Tests to Add Before Any Power BI Dashboard Goes Live

TL;DR: Before publishing any Power BI dashboard, run a 12-step data quality validation checklist to ensure accuracy, consistency, and trust in your analytics. From schema consistency to null handling and...

Business IntelligencePower BIReporting
6 min read
Read More
An Introduction to Aggregators in Make: How I Learned to Group, Combine, and Simplify Data
Dashboard
An Introduction to Aggregators in Make: How I Learned to Group, Combine, and Simplify Data

When I first started building scenarios in Make, I often ran into the same problem: I had too much data scattered across multiple bundles, and I needed a way to...

Business IntelligenceReporting
8 min read
Read More

Ready to Transform Your Data?

Book a free demo and see how we can help you unlock insights from your data.

Book a Demo