Language English English Español Español Deutsch Deutsch Português Português
🇬🇧 English 🇪🇸 Español 🇩🇪 Deutsch 🇧🇷 Português
Language:EnglishEnglishEspañolEspañolDeutschDeutschPortuguêsPortuguês

mySQL UPDATE statement working example

I am a true fan of mySQL and one of my favorite statements is the UPDATE statement. One of the big needs for any website with a wiki or with user generated content is the ability to edit content drawn from a database. The UPDATE statement is the statement that allows a webmaster to do this.

The example I will use here is a user table with columns for username, password, number of logins, and user description.

Say I want to update George’s user description – that can be done really easily using the UPDATE command in a mySQL database with proper WHERE clauses to ensure security.

There is one more little trick I want to share which I enjoy with the mySQL UPDATE statement and that is the ability to perform math on a column. Really beautifully simple to do and yet really useful in a whole host of cases… I hope you learn to love the mySQL UPDATE statement too!

Get my marketing cheat sheets at Click Here

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *