Search code examples
phpmysqlsqlsql-update

How to set all values in a single column MySQL Query


I've made a new tuple called 'description' in a table.

Just want a query to set all the 'description' tuples for my already created data to a certain piece of text.

E.g. of fundamental 'update' query, but not sure if it is not the right method to use:

UPDATE suppliers SET name = 'HP'WHERE name = 'IBM'; 

Solution

  • Sorted

    I used the following query:

    UPDATE suppliers SET description = 'business'
    

    This sets all the description FIELDS values in my table to the string "business".