Results 1 to 5 of 5

Thread: catalog view

  1. #1
    Join Date
    Jul 2012
    Posts
    6

    Unanswered: catalog view

    Write a select Statement that selects all of the columns for the catalog view that returns information about foreign keys. How many foreign keys are defined in the AP database?

    Any help here would be appreciated!! Not sure how to get started here.

  2. #2
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Not clear if you want a return from a catalog view that holds info on foreign keys, or a return from the statement that contains all fields of that catalog view?
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  3. #3
    Join Date
    Aug 2012
    Posts
    30
    you should be using sys.foreign_keys,sys.foreign_key_columns catalog views for that

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    What if the professor wants him to use the INFORMATION_SCHEMA views?

  5. #5
    Join Date
    Aug 2012
    Posts
    30
    Then corresponding views in INFORMATION_SCHEMA schema can be used

    REFERENTIAL_CONSTRAINTS and CONSTRAINT_COLUMN_USAGE

Posting Permissions

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