Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle find constraints referencing a table

SELECT cons.OWNER 			AS CHILD_OWNER,
       cons.TABLE_NAME 		AS CHILD_TABLE,
       cons.CONSTRAINT_NAME AS CONSTAINT_NAME,
       cons.CONSTRAINT_TYPE AS CONSTRAINT_TYPE,
       col.OWNER 			AS PARENT_OWNER,
       col.TABLE_NAME 		AS PARENT_TABLE,
       col.COLUMN_NAME 		AS COLUMN_NAME
FROM DBA_CONS_COLUMNS col, DBA_CONSTRAINTS cons
WHERE cons.R_OWNER = col.OWNER
  AND cons.R_CONSTRAINT_NAME = col.CONSTRAINT_NAME
  AND cons.TABLE_NAME = 'table_name';
Comment

PREVIOUS NEXT
Code Example
Sql :: what is rownum in oracle 
Sql :: select all same column value in sql 
Sql :: modify column name in tsql 
Sql :: how to query a db sqlite3 database in django python 
Sql :: mysql order by calculated column 
Sql :: django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.8.0. 
Sql :: print pl sql 
Sql :: sql split comma separated string into rows 
Sql :: fatal database postgres does not exist 
Sql :: get id from just inserted row mysql server python 
Sql :: difference berween database and data base management system 
Sql :: wincc 7.4 to sql stackoverflow 
Sql :: enlever les doubles espaces dans les tables postgresql 
Csharp :: count number of enum values C# 
Csharp :: how to make a hello world program in c# 
Csharp :: c# read text file to list string 
Csharp :: how to detect mouse click in c# 
Csharp :: unity reset rigidbody velocity 
Csharp :: how to run an external program with c# 
Csharp :: read in multiple numbers c# 
Csharp :: check if process is open c# 
Csharp :: c# list to string 
Csharp :: c# print to console 
Csharp :: how to print in c# 
Csharp :: decode base64 string c# 
Csharp :: unity textmesh pro 
Csharp :: manchester united 
Csharp :: create asset menu unity 
Csharp :: how to detect when a player move in unity 
Csharp :: mailkit send attachment 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =