Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle list constraints

SELECT *
FROM ALL_CONSTRAINTS c,
     ALL_CONS_COLUMNS cols
WHERE c.CONSTRAINT_TYPE = 'P'
  AND c.CONSTRAINT_NAME = COLS.CONSTRAINT_NAME
  AND c.OWNER = COLS.OWNER
  AND c.OWNER = 'schema_name'
  AND cols.TABLE_NAME = 'table_name'
ORDER BY cols.TABLE_NAME, COLS.POSITION;
Comment

PREVIOUS NEXT
Code Example
Sql :: query to find table size in oracle 12c 
Sql :: sql query to get column names and data types in sql server 
Sql :: sql server: query to find out all the places where the table is used 
Sql :: how to install psql in ubuntu 
Sql :: set mysql mode global query 
Sql :: .... ERROR! The server quit without updating PID file mysql centos 
Sql :: get schema of table sql 
Sql :: get table columns from sql 
Sql :: show indexes in mql 
Sql :: mysql server does not start mac 
Sql :: postgres sequence name 
Sql :: open postgress in terminal mac 
Sql :: mssql current date 
Sql :: oracle check table lock 
Sql :: how to get list of synonyms in oracle 
Sql :: how to change table name in sqlite 
Sql :: cast to date bigquery 
Sql :: sql server alter column 
Sql :: Create a keyspace cassandra 
Sql :: mysql import sql file 
Sql :: raw query must include primary key 
Sql :: how to delete columns in sql 
Sql :: how to convert number to hours and minutes in oracle sql 
Sql :: set statiscis on in sql server 
Sql :: mysql return text after a final full stop 
Sql :: oracle aleter trigger ora-01031 
Sql :: bigquery get current date 
Sql :: how to check nls format in oracle 
Sql :: psql show with user is logged in 
Sql :: What is the compatibility level of a SQL database 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =