My Oracle Support Banner

SCRIPT: How to Check if Foreign Key Columns are Indexed for a Specific Table (Doc ID 1227554.1)

Last updated on JULY 18, 2023

Applies to:

Oracle Database Backup Service - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database - Enterprise Edition - Version 8.0.3.0 to 11.2.0.2.0 [Release 8.0.3 to 11.2]
Information in this document applies to any platform.

Goal

This article provides SQL statements to check if foreign keys are indexed for a table. This script lists all foreign keys and indexes of a given table, and all foreign keys and indexes of tables referencing the primary key or unique keys of a given table.

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
 Requirements
 Configuring
 Instructions
 Script
 Sample Output
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.