Local & Cascaded Check

This lesson looks at the two types of rule checking that can be used with the CHECK option clause.

LOCAL AND CASCADED CHECK

Local and cascaded check clauses are used to determine the scope of rule testing when a view is created based on another view. To summarize, Local check option restricts the rule checking to only the view being defined whereas the Cascaded check option checks the rules of all underlying views. In the absence of these keywords, cascaded check is used as default.

Syntax

CREATE [OR REPLACE] VIEW view_name AS

select_statement

WITH [LOCAL | CASCADED] CHECK OPTION;

Connect to the terminal below by clicking in the widget. Once connected, the command line prompt will show up. Enter or copy and paste the command ./DataJek/Lessons/44lesson.sh and wait for the MySQL prompt to start-up.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.