DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Constraint

  1. #1
    Join Date
    Jun 2000
    Posts
    26
    I have a table which holds the relationship between a person and their addresses.

    address_id
    person_id
    address_type
    start_Date
    end_date

    A person can have more than one address_type (e.g. work, home).
    If the relationship is current, then the end_date is null.

    I want to create a constraint which will prevent a person from having more than one current relationship of a particular address_type.

    How can I do this ?

  2. #2
    Join Date
    Aug 2000
    Posts
    462
    use a db trigger

Posting Permissions

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


Click Here to Expand Forum to Full Width