Course Content

Course Content

Update Operation Part 1

I will show you how to use the update command in order to get the latest version of your php blog.


Returns the number of affected rows on success, and -1 if the last query failed. If the last query was a DELETE query with no WHERE clause, all of the records will have been deleted from the table but this function will return zero with MySQL versions prior to 4.1. 2.

Updating a field in a given table requires two steps: 1) Changing the value of the field to be updated 2) Applying the UPDATE statement against the current value of the field. Here is an SQL update query example: UPDATE "table1" SET "key_field" = "New Value" WHERE "id = ?"; This SQL update query changes the value of an existing key field to New Value and updates all rows where that key matches with that of the input. The update queries workload for low-level and high-level queries has been reduced making them more efficient.

QL can be used with limits to create more complex queries. The SQL statement LIMIT 20, 10 is the same as SELECT * FROM users WHERE = 20 LIMIT 10, 20 is the same as SELECT * FROM users WHERE BETWEEN 10 AND 20 LIMIT 50, 100 is the same as SELECT * FROM users AS u1 WHERE BETWEEN 50 AND 100 LIMIT 1, 2 is the same as SELECT * FROM users AS u2 WHERE<> 1

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
297K+ Downloads
App Download Section Circle 1
4.5 Rating
App Download Section Circle 2
10K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere