Home Forums SQL Server 2008 SQL Server Newbies Setting a Primary key to subsequential Data (Header - Line) RE: Setting a Primary key to subsequential Data (Header - Line)

  • There is no default sort order, so SELECT * FROM Table is not guaranteed to give the same sequence you put the records into the table.

    The column you added cannot be a primary key because it is not unique.

    The ROW_NUMBER() function needs an ORDER BY clause - which column is used to order the data? - there does not appear to be one from the data you gave.

    From the data given, I don't think it can be done. I would need more information, like the full table definition, and where the data comes from (an Excel file? it appears to be CSV)