The list of all the queries

Perhaps incorrect WHEN clause

Query goal: Find row level triggers that have action condition (WHEN clause) but the Boolean expression in its specifications does not refer to neither NEW nor OLD variable.
Query type: Problem detection (Each row in the result could represent a flaw in the design)
Query reliability: High (Few or no false-positive results)
Query license: MIT License
Data source: INFORMATION_SCHEMA only
SQL query: Click on query to copy it

SELECT trigger_schema, trigger_name, action_timing, action_orientation, event_manipulation, event_object_schema AS table_schema, event_object_table AS table_name, action_condition AS suspected_action_condition
FROM INFORMATION_SCHEMA.triggers
WHERE action_orientation='ROW'
AND action_condition!~*'new[.]'
AND action_condition!~*'old[.]'
ORDER BY trigger_schema, trigger_name;

Collections where the query belongs to

Collection nameCollection description
Find problems automaticallyQueries, that results point to problems in the database. Each query in the collection produces an initial assessment. However, a human reviewer has the final say as to whether there is a problem or not .

Categories where the query belongs to

Category nameCategory description
Triggers and rulesQueries of this category provide information about triggers and rules in a database.

The list of all the queries