To change the definition of an existing view, use the ALTER VIEW statement. ALTER VIEW discards the current definition for the view and replaces it with the new definition in the statement. It is an error if the named view does not exist. Syntactically, the only differences from CREATE VIEW are that the initial keyword is ALTER rather than CREATE, and the OR REPLACE option cannot be used. The following statement redefines the LargePop view created in the previous section so that it no longer includes a WITH CHECK OPTION clause: ALTER VIEW LargePop AS SELECT Name, Population FROM CountryPop WHERE Population >= 100000000; |