SQL Server Performance

with Check Option in Select Statement

Discussion in 'General DBA Questions' started by k_ashish2002, Sep 13, 2006.

  1. k_ashish2002 New Member

    Hi Friends,

    I have a question about SQL syntax. I was just going through a view syntax and there within Select statement " with check option" is used. What is this for?

    Regards
    Ashish Kuriyal
    DBA
  2. Roji. P. Thomas New Member

    From BOL

    WITH CHECK OPTION

    Forces all data modification statements executed against the view to adhere to the criteria set within select_statement. When a row is modified through a view, the WITH CHECK OPTION ensures the data remains visible through the view after the modification is committed.

    Which means that, When WITH CHECK OPTION is specified in the definition of a view, any INSERTS/UPDATES should satisfy the filter criteria(s) specified in the View.

    Roji. P. Thomas
    Microsoft SQL Server MVP
    http://toponewithties.blogspot.com

Share This Page