Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Deleting Rows | Updating & Deleting Data
Introduction to SQL
course content

Contenuti del Corso

Introduction to SQL

Introduction to SQL

1. Getting Started
3. Sorting Data
4. Populating a Database
5. Updating & Deleting Data

book
Deleting Rows

We can conditionally select and delete rows from a table using the DELETE statement.

Following is the syntax of the DELETE statement:

sql

The DELETE statement selects rows from table_name based on a condition and deletes them.

Example: Removing Graduated Students

Consider a table students with the following columns name, age, grade, score, and graduation_year.

We would like to delete all the rows from the table where the graduation_year is less or equal to 2024, since those students have already graduated and we no longer want to retain their data.

This can be done using the following query:

sql

Demonstration:

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 5. Capitolo 5
Siamo spiacenti che qualcosa sia andato storto. Cosa è successo?
some-alt