MariaDB Update Query - MariaDB

How to use update query in MariaDB?

To modify the existing fields and change the values you can use the UPDATE command. To specify the new values assigned and modify the specified columns you can use the SET clause. Usually, these values can be mentioned as an expression or the default value of the field. Use DEFAULT keyword to set the required default value. Here, WHERE clause is used to specify conditions for an update and/or an ORDER BY clause to update in a certain order.
Go through below mentioned general syntax –
Let’s apply an UPDATE command through the command prompt or by PHP script.

The Command Prompt

At the command prompt, simply use a standard command root –

PHP Update Query Script

Employ the mysql_query() function in UPDATE command statements –
On successful data update, you will see the following output –

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

MariaDB Topics