SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard
    Join Date
    May 2002
    Posts
    1,370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    creating indexes; particulars

    Can creating an index on a table field, where there are already existing values, change the values? Must this be done on a table without data?

    Is the timestamp by chance based on auto-increment; I ask since I may be joining tables with an imported key (from tempoary table) and would the timestamp feature to show the last row per user.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,014
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    no, creating an index doesn't change any data values

    timestamp is not based on auto_increment, timestamp is based on the server clock
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Wizard
    Join Date
    May 2002
    Posts
    1,370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you r937

  4. #4
    SitePoint Guru asterix's Avatar
    Join Date
    Jun 2003
    Posts
    847
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In MSSQL the timestamp is based on the server clock, but the server clock is not particulary precise (nearest 3ms).

    So in MSSQL the Timestamp datatype is classed as being "binary", in actuality it is a standard datetime value with millisecond values and a binary counter so that no two rows can have the same timestamp.


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
  •