View With CHECK OPTION
Medium
Views, Procedures & Triggers
Create a view EngineeringStaff showing id, name and salary of employees in department 1 and make sure that inserts or updates through the view cannot create rows outside department 1.
Table schema
Employees(id INT PRIMARY KEY, name VARCHAR(50), department_id INT, salary INT)Sample data
Employees: (1, A, 1, 100), (2, B, 2, 200)
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.