Monday, August 31, 2009

MCTS 70-433 SQL Server WITH CHECK OPTION of VIEWs

Suppose standard HR staff have been restricting to viewing staff under grade 6 ...


create view grunts as

  select empid, empname, ... from employees where grade <>


Here using the "WITH CHECK OPTION" prevents the grunts view being used in an update statement which violates the grade <>

No comments: