Search
 
SCRIPT & CODE EXAMPLE
 

SQL

get primary key of table

SELECT a.COLUMN_NAME
FROM all_cons_columns a INNER JOIN all_constraints c 
     ON a.constraint_name = c.constraint_name 
WHERE c.table_name = 'TBL'
  AND c.constraint_type = 'P';
Comment

PREVIOUS NEXT
Code Example
Sql :: load sql into mamp 
Sql :: create or replace table sql 
Sql :: select last 2 characters sql 
Sql :: is between inclusive or exclusive sql 
Sql :: SQL Count UNIQUE Rows 
Sql :: oracle sql create table from select 
Sql :: psql fatal database does not exist 
Sql :: SQL Server rename foreign key constraint 
Sql :: is not numeric sql 
Sql :: postgres set column equal to another 
Sql :: postgresql create query 
Sql :: get current month last date in sql server 
Sql :: sql server locks 
Sql :: mysql case when or 
Sql :: mysql create view full table 
Sql :: sql function 
Sql :: mysql multiple count 
Sql :: sql compare strings 
Sql :: pl/sql procedure example 
Sql :: mysql search table in all databases 
Sql :: date conversion in mysql column 
Sql :: xampp import sql file command line 
Sql :: postgresql connection string c# 
Sql :: oracle list grants on package 
Sql :: rename table sql server 
Sql :: sqlite save db 
Sql :: mysql select default if null 
Sql :: sql all 
Sql :: SQL UNION ALL Operator 
Sql :: SQL server how to see user permissions on objects 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =