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

  • 16 พฤศจิกายน 2554 21:22
     
     

    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?

ตอบทั้งหมด

  • 16 พฤศจิกายน 2554 21:57
    ผู้ดูแล
     
     คำตอบ
    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
    • ทำเครื่องหมายเป็นคำตอบโดย aojiku01 16 พฤศจิกายน 2554 22:16
    •