Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Updating Rows in a Table | 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
Updating Rows in a Table

The UPDATE statement can be used for updating certain rows from a table.

Following is the syntax of the UPDATE statement:

sql

The UPDATE statement selects rows from the targeted table based on the given condition and updates them with the values given after the SET keyword, for their corresponding columns.

Example: Updating Students' Data

Consider a table students having the columns name, age, score and grade. By default the grade is set to 'None' for all students.

We would like to change the grade to 'A+' for all the students with a score greater than 90. This can be done using the following query:

sql

Demonstration:

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

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