sp_fkeys -- Oracle equivalent?

  • Ray K

    SSC-Dedicated

    Points: 31084

    Does anyone know if Oracle has an equivalent of sp_fkeys?

    +--------------------------------------------------------------------------------------+
    Check out my blog at https://pianorayk.wordpress.com/

  • Ray K

    SSC-Dedicated

    Points: 31084

    Over a year since I asked this question, it still applies.  Anyone?  Anyone?  Bueller?

    +--------------------------------------------------------------------------------------+
    Check out my blog at https://pianorayk.wordpress.com/

  • Lowell

    SSC Guru

    Points: 323442

    I don't have access to an Oracle anymore, but this document over at Oracle says that the table ALL_CONS_COLUMNS is the equivalent of sp_pkeys and sp_fkeys results, does that help?

    https://docs.oracle.com/cd/B19306_01/gateways.102/b14270/apc.htm

    ALL_CONS_COLUMNS sp_pkeys + sp_fkeys
    ALL_CONSTRAINTS sysusers + sysobjects + sysindexes + sysconstraints + sysreferences

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Ray K

    SSC-Dedicated

    Points: 31084

    Yep, this is helpful.  Let me see what I can do with this.  Thanks!

    +--------------------------------------------------------------------------------------+
    Check out my blog at https://pianorayk.wordpress.com/

  • Ray K

    SSC-Dedicated

    Points: 31084

    Actually, I did manage to find some queries that give me what I need.  I guess I was just hoping that Oracle would have a functional equivalent to sp_fkeys (and sp_pkeys, for that matter), but that was probably wishful thinking on my part.

    Sorry for wasting your bandwidth!

    For anyone looking for an answer to this, I found this link (among others) on StackOverflow...

    +--------------------------------------------------------------------------------------+
    Check out my blog at https://pianorayk.wordpress.com/

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply