HOME | PHP Tutorial | CSS
facebook icon
AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP
HTML Tutorial

CSS Tutorial

SQL update - SQL update select - SQL update multiple rows


The SQL UPDATE Query is used to modify the existing records in a table from database. You can use WHERE with the UPDATE query to update the selected rows from your database, otherwise all the rows would be affected.

SQL update - SQL update select - how to create? - example


UPDATE Syntax
UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition;

The following SQL statement update "Customers" table:

Example 1:
ID Name Contact Address City
1

Jones Cruise Ana Maria Will Str. 57 Paris
2 Robert Caine Ana Trujillo Avda. Larga 24 Roma
3 Brad Bale Antonio mauro Mataderos 19 Madrid

UPDATE Customers
SET Contact = 'Meryl Streep', Address= 'Avenida 34a'
WHERE CustomerID = 1;

UPDATE: Updates the first customer (ID = 1) with a new Contact person and a new Address.

ID Name Contact Address City
1

Jones Cruise Meryl Streep Avenida 34a Paris
2 Robert Caine Ana Trujillo Avda. Larga 24 Roma
3 Brad Bale Antonio mauro Mataderos 19 Madrid
Note: WHERE clause specifies which record(s) that should be updated

sql update, select, multiple rows, join, multiple columns, date, set null, column value, php SQL update - SQL update select - sql tutorial

3291. SQL IN Operator - example, sql tutorial
SQL IN Operator - example sql tutorial
https://www.agernic.com/sql-tutorial/sql-in-operator-with-example.html

2817. PL/SQL Tutorial
We provide you with a comprehensive PL/SQL tutorial to help you learn PL/SQL quick and fun.
http://www.zentut.com/plsql-tutorial/

2568. SQL COUNT - SQL Tutorial

http://www.sql-tutorial.net/SQL-COUNT.asp

2579. SQL MAX - SQL Tutorial

http://www.sql-tutorial.net/SQL-MAX.asp

2570. SQL DELETE - SQL Tutorial

http://www.sql-tutorial.net/SQL-DELETE.asp

363. SQL Tutorial
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, PHP, and XML.
https://www.w3schools.com/sql/default.asp

Your add here
How to get PHP errors to display?
How to prevent sql injection in php mysqli
How do I get PHP errors to display - PHP error_reporting()
mysql_query(): The mysql extension is deprecated and will be removed i
Function eregi_replace() is deprecated in php - How to fix
PHP delete an element from an array
Uncaught Error: Call to undefined function MYSQL_NUM_ROWS() in
Deprecated: mysql_connect() mysql extension is deprecated and will be
mysqli_fetch_array() expects parameter 1 to be mysqli_result boolean g
SQL IN Operator - example
SQL BETWEEN Operator
SQL like syntax and example
SQL WHERE AND & OR multiple conditions
SQL create table primary key autoincrement
PHP mysqli_connect () Function
SQL COUNT(), AVG() and SUM() Functions
Display data from SQL database with MySQLi into php - html table
SQL CREATE DATABASE - example
SQL mysql order by columns, by date, by asc, by desc, random with PHP
PHP mysqli_query() Function - mysqli query
SQL delete row - SQL delete table
SQL update - SQL update select
Insert into SQL - Insert into table SQL - Insert data in sql
Login in PHP - simple login script with PHP MYSQL