Put the same value in all MySQL records.



  • A table bid_country♪ There's a field. date_create♪ It's empty. We need to update all the records so that the field's value is the current date. How do you do that?



  • May be as follows:

    UPDATE
      bid_country
    SET
      date_create = NOW()
    

    This request will be placed in the field date_create Local time on the clock belt. If UTC time is required to better use the function UTC_TIMESTAMP()

    UPDATE
      bid_country
    SET
      date_create = UTC_TIMESTAMP()
    

Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2