Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

View With CHECK OPTION

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.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.