none
Error in [AdventureWorks2008].[Sales].[SalesOrderDetail] ?

    Question

  • The [AdventureWorks2008].[Sales].[SalesOrderDetail] table looks like it has an error in the SalesOrderDetailID column. My guess is that this column is suppose to have a sequential set of number based on the SalesOrderID column, i.e. 1 to 12 for SalesOrderID=43659. Instead the values in the SalesOrderDetailID column are continuous with no indication of it being sequential by SalesOrderID.

     Or maybe the values are right and I don't understand the data in the table. But if I am right, is there a way to fix this using T-SQL or PL-SQL?

    mercredi 16 novembre 2011 21:22

Réponses

  • The SalesOrderDetailID is a primary key for this table, so it is supposed to be unique across the whole table.
    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog
    • Marqué comme réponse aojiku01 mercredi 16 novembre 2011 22:16
    mercredi 16 novembre 2011 21:57
    Modérateur