MySQL - Update and Delete Records (update, delete)
Find code and diagrams at: https://ift.tt/2zY82iQ Updating and Deleting records in a table is very easy. Remember that MySQL does not ask for verification of a command, and so a poorly written statement can be devastating to a database. update users set column1=‘x’ where column2=’a’; – Updates ALL records where condition is true update users set column1=‘x’ where column2=’a’ and column3=‘b’; – Updates ALL records where two conditions are true update users set column1=‘x’, column2=‘y’ where column3=’a’ ; – Updates two columns where condition is true delete from table where column=‘x’; – Deletes ALL records where the conditions is true delete from table where column1=‘x’ and column2=‘y’; – Deletes ALL records where two conditions are true
View on YouTube
Find code and diagrams at: https://ift.tt/2zY82iQ Updating and Deleting records in a table is very easy. Remember that MySQL does not ask for verification of a command, and so a poorly written statement can be devastating to a database. update users set column1=‘x’ where column2=’a’; – Updates ALL records where condition is true update users set column1=‘x’ where column2=’a’ and column3=‘b’; – Updates ALL records where two conditions are true update users set column1=‘x’, column2=‘y’ where column3=’a’ ; – Updates two columns where condition is true delete from table where column=‘x’; – Deletes ALL records where the conditions is true delete from table where column1=‘x’ and column2=‘y’; – Deletes ALL records where two conditions are true
View on YouTube
MySQL - Update and Delete Records (update, delete)
Reviewed by iot portal
on
9:04 AM
Rating:
Reviewed by iot portal
on
9:04 AM
Rating:
No comments: