How do you change date for over 700 records at once

Discussion in 'Databases' started by jminscoe, Jul 2, 2007.

  1. #1
    I imported my database from one host to another now I want to change the date to refect todays date on over 700 records is there a way besides one by one
     
    jminscoe, Jul 2, 2007 IP
  2. Clark Kent

    Clark Kent Guest

    Messages:
    122
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This query updates ALL ROWS Datefield to now.

    update YourTableName set DateFieldName = CURRENT_TIMESTAMP;
     
    Clark Kent, Jul 2, 2007 IP
    jminscoe likes this.
  3. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #3
    For ORACLE DB, you can do with these SQL commands:
    
    update TableName set DateFieldName = sysdate;
    commit;
    
    Code (markup):
     
    ajsa52, Jul 2, 2007 IP
  4. jminscoe

    jminscoe Peon

    Messages:
    1,223
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thank you that worked perfectly
     
    jminscoe, Jul 3, 2007 IP