Basically command is
update table_name set field_target=new_value where criteria;
*Notes
update table_name set field_target=new_value where criteria;
*Notes
table_name | : | the name of the table whose data you want to change. |
field_target | : | the value of a field you wish to edit. |
new_value | : | The new value is entered |
criteria | : | unique data that are characteristic of the data that we want to change (usually always code). |
if you do not have a database and a table please visit the following link
[Step 06] how to display the data in a database table mysql
Then we will show all existing data as follows:
ScreenShot: Database & Table [Click Here]
Then we'll try to update the data of the item "NEXUS 7" where the price of 3.2 million will be converted into 3.5 million.
then the command is
update items set price='3500000' where items_id='A001';
*Notes
table_name | : | items |
field_target | : | price |
new_value | : | 3500000 |
criteria | : | items_id='A001'(because the codec 'A001' is a unique code of the item 'NEXUS 7') |
ScreenShot: Update data [Click Here]
Tidak ada komentar:
Posting Komentar