Suppose in the following table I want to get the primary key constraint name, which uapplication_pkey
CREATE TABLE application
(
applicationid integer NOT NULL,
screatedby character varying(255),
screatedon timestamp without time zone,
sfwversion integer,
smodifiedby timestamp without time zone,
smodifiedon character varying(255),
stenantid character varying(255),
CONSTRAINT uapplication_pkey PRIMARY KEY (applicationid)
)
I got help from this How to get the exact name of a constraint from a SQLException
But unable to find a solution.
source
share