Results 1 to 3 of 3

Thread: SQL Server 2000

  1. #1
    4 Star Lounger
    Join Date
    Apr 2001
    Location
    Guatemala City
    Posts
    515
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SQL Server 2000

    In the Northwind sample database, the Employees table has a one-to-many connection showing as a loop. In other words, the Employees table is both the "many" and the "one". What does that mean?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: SQL Server 2000

    The "Reports To" field links back to the ID field of another employee.in the same table. The manager is the "one" and his/her subordinates are the "many".

  3. #3
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SQL Server 2000

    In addition to what Hans mentioned, this is generally called recursion.

    The table is recursive - meaning that it references itself. This is pretty common when dealing with heirarchal relationships in data or code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •