Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to check constraints on a table in sql oracle

SELECT *
  FROM user_cons_columns
 WHERE table_name = '<your table name>';
Comment

how to find constraints on a table in oracle

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 :: create database ms sql server 
Sql :: SQL LIKE With Wildcards 
Sql :: oracle select partition 
Sql :: create table database in psql 
Sql :: Executing an update/delete query 
Sql :: sql check if a record exists 
Sql :: stored procedure vs view 
Sql :: utf8_encode mysql 
Sql :: mysql extract days 
Sql :: add 10 to all numbers in a column sql 
Sql :: module operator in oracle sql 
Sql :: guid string to binary better 
Sql :: mysql listing get a particu particular user firsdt 
Csharp :: unity get number of child objects 
Csharp :: how to write hello world in c# 
Csharp :: add only bottom border to container flutter 
Csharp :: quit button unity 
Csharp :: how to delete all files in a directory c# 
Csharp :: how to stop window from terminating c# visual studio 
Csharp :: unity play particle system 
Csharp :: wpf bind to self 
Csharp :: for loop unity 
Csharp :: print in c# 
Csharp :: hello world c 
Csharp :: convert int to double c# 
Csharp :: resize image c# 
Csharp :: 2d unity point at 
Csharp :: get random file in directory c# 
Csharp :: get remainder of number c# 
Csharp :: c# project path 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =