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

48. SQL Tutorial - An Ultimate Guide for Beginners
SQL Tutorials for Beginners - Learn the concepts of world
https://www.tutorialrepublic.com/sql-tutorial/

2574. SQL Hosting - SQL Tutorial

http://www.sql-tutorial.net/sql-hosting.asp

2588. SQL UPDATE - SQL Tutorial

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

2570. SQL DELETE - SQL Tutorial

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

2563. SQL Aliases - SQL Tutorial

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

3228. SQL - Syntax, sql tutorial
SQL - Syntax sql tutorial
https://www.agernic.com/sql-tutorial/sql-syntax.html

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