faqts : Computers : Databases : MySQL : Language and Syntax : Queries : Update

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

28 of 38 people (74%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

How can I update many columns of a row with a single query?

Jan 23rd, 2000 21:59
Nathan Wallace, Hans H. Anderson


Try using the UPDATE query:

    http://www.mysql.com/Manual_chapter/manual_Reference.html#UPDATE

Here is a rough example:

    update table
    set    column1 = 'column1', 
           column2 = 'column2', 
           column3 = 'column3'
    where id = 100;