SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: SQL statement to change column value

  1. #1
    SitePoint Evangelist artcoder's Avatar
    Join Date
    Aug 2005
    Location
    Planet Earth
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SQL statement to change column value

    I have a table with 400 records. What is example SQL statement to change column "cars" to value of "1" for all records in the table?

  2. #2
    SitePoint Guru
    Join Date
    Sep 2008
    Location
    Dubai
    Posts
    971
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "UPDATE car_table SET cars = 1";

  3. #3
    SQL Consultant silver trophybronze trophy
    SitePoint Award Recipient r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    38,463
    Mentioned
    35 Post(s)
    Tagged
    1 Thread(s)
    UPDATE car_table SET cars = 1

    big difference!!
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •