Preamble
After creating a foreign key, you may need to drop the foreign key from the table. You can do this with the ALTER TABLE operator in Oracle/PLSQL.
Syntax to drop a foreign key in Oracle / PLSQL
ALTER TABLE table_name
DROP CONSTRAINT constraint_name;
Example
If you created a foreign key like this:
CREATE TABLE supplier
( supplier_id numeric(10) not null,
supplier_name varchar2(50) not null,
contact_name varchar2(50),
CONSTRAINT supplier_pk PRIMARY KEY (supplier_id)
);
CREATE TABLE products
( product_id numeric(10) not null,
supplier_id numeric(10) not null,
CONSTRAINT fk_supplier
FOREIGN KEY (supplier_id)
REFERENCES supplier(supplier_id)
);
In this example we created the primary key table of the supplier called supplier_pk.
It consists of only one supplier_id field. Then we created a foreign key named fk_supplier in the products table that refers to the supplier table based on the supplier_id field.
If we need to drop the foreign key named fk_supplier, we need to execute the following command:
ALTER TABLE products
DROP CONSTRAINT fk_supplier;
SQL tutorials: SQL Foreign Key Constraint
About Enteros
Enteros offers a patented database performance management SaaS platform. It proactively identifies root causes of complex business-impacting database scalability and performance issues across a growing number of clouds, RDBMS, NoSQL, and machine learning database platforms.
The views expressed on this blog are those of the author and do not necessarily reflect the opinions of Enteros Inc. This blog may contain links to the content of third-party sites. By providing such links, Enteros Inc. does not adopt, guarantee, approve, or endorse the information, views, or products available on such sites.
Are you interested in writing for Enteros’ Blog? Please send us a pitch!
RELATED POSTS
How to Optimize Logistics and Transportation Operations with Enteros Database Software, AI-Powered Analytics, and Database Observability
- 18 August 2026
- Database Performance Management
Introduction Logistics and transportation companies operate in an environment where timing, visibility, and data accuracy are critical. Every shipment, delivery, warehouse transaction, route update, fleet event, and customer interaction generates data. Modern logistics organizations rely on Transportation Management Systems (TMS), Warehouse Management Systems (WMS), ERP, fleet management, order management, customer portals, supply chain analytics, and … Continue reading “How to Optimize Logistics and Transportation Operations with Enteros Database Software, AI-Powered Analytics, and Database Observability”
Optimizing Banking Cloud Infrastructure with AIOps, FinOps, and Intelligent Database Analytics
Introduction Banking has become increasingly dependent on cloud infrastructure. Digital banking applications, mobile banking, payment gateways, loan platforms, fraud detection systems, customer portals, and real-time transaction services all rely on infrastructure that must deliver high performance around the clock. At the same time, banks face a difficult operational challenge: they must increase technology capacity without … Continue reading “Optimizing Banking Cloud Infrastructure with AIOps, FinOps, and Intelligent Database Analytics”
How AIOps and FinOps Reduce Cloud Costs While Improving Financial Application Performance
Introduction Financial applications operate in one of the most demanding digital environments. Banking platforms, payment gateways, digital wallets, lending applications, insurance systems, trading platforms, and financial services applications must process large transaction volumes while delivering fast, secure, and reliable experiences. As financial organizations move more workloads to cloud and hybrid environments, they gain scalability and … Continue reading “How AIOps and FinOps Reduce Cloud Costs While Improving Financial Application Performance”
How to Optimize Automotive Operations with Enteros Database Software, AI-Powered Analytics, and Database Observability
Introduction The automotive industry is transforming into a software- and data-driven ecosystem. Connected vehicles, electric vehicles, autonomous technologies, manufacturing automation, digital sales, predictive maintenance, and intelligent supply chains are creating unprecedented database workloads. Automotive organizations must connect vehicle data, manufacturing systems, customer platforms, suppliers, dealers, finance, and logistics. Enteros helps automotive organizations improve database performance … Continue reading “How to Optimize Automotive Operations with Enteros Database Software, AI-Powered Analytics, and Database Observability”