Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sys view equivalent of INFORMATION_SCHEMA query

I wanted to get a list of all cascading deletes in my database, so I used the INFORMATION_SCHEMA view:

SELECT *
FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS
WHERE DELETE_RULE = 'CASCADE'

What is the equivalent of this query using the sys system views?

like image 479
Ricky Keane Avatar asked Oct 30 '22 11:10

Ricky Keane


1 Answers

SELECT *
FROM sys.foreign_keys
WHERE delete_referential_action = 1
like image 60
Devart Avatar answered Nov 15 '22 06:11

Devart