SELECT
TABLE_NAME,COLUMN_NAME,CONSTRAINT_NAME, REFERENCED_TABLE_NAME,REFERENCED_COLUMN_NAME
FROM
INFORMATION_SCHEMA.KEY_COLUMN_USAGE
WHERE
REFERENCED_TABLE_SCHEMA ='<database>'AND
REFERENCED_TABLE_NAME ='<table>';
List Forign keys of a table column
SELECT
TABLE_NAME,COLUMN_NAME,CONSTRAINT_NAME, REFERENCED_TABLE_NAME,REFERENCED_COLUMN_NAME
FROM
INFORMATION_SCHEMA.KEY_COLUMN_USAGE
WHERE
REFERENCED_TABLE_SCHEMA ='<database>'AND
REFERENCED_TABLE_NAME ='<table>'AND
REFERENCED_COLUMN_NAME ='<column>';
Drop a Forign Key from a Table
MySQL:
ALTER TABLE Orders
DROP FOREIGN KEY FK_PersonOrder;
SQL Server / Oracle / MS Access:
ALTER TABLE Orders
DROP CONSTRAINT FK_PersonOrder;
Email remains one of the most common ways for cybercriminals to deceive individuals and organizations. Phishing attacks, spoofing, and other email-based threats can harm your
The transportation and logistics industry is undergoing a digital revolution, and fleet management is at the forefront of this transformation. Artificial Intelligence (AI) and Machine
In today’s rapidly evolving tech landscape, staying current with the latest versions of system frameworks, programming languages, and databases is more than a best practice—it’s