SQL> SELECT * FROM EMPLOYEE; DELETION OF VIEW: Rows of data can be deleted from a view. The same rules that apply to the UPDATE and INSERT commands apply to the DELETE command. DELETE STATEMENT SYNTAX: SQL> DELETE <VIEW_NMAE>WHERE <COLUMN NMAE> =’VALUE’; Command: SQL> DELETE FROM EMPVIEW WHERE EMPLOYEE_NAME='SRI'; 1 row deleted. SQL> SELECT * FROM EMPVIEW; UPDATE STATEMENT: A view can be updated under certain conditions: The SELECT clause may not contain the keyword DISTINCT. The SELECT clause may not contain summary functions. The SELECT clause may not contain set functions. The SELECT clause may not contain set operators. The SELECT clause may not contain an ORDER BY clause. The FROM clause may not contain multiple tables. The WHERE clause may not contain subqueries. The query may not contain GROUP BY or HAVING. Calculated columns may not be updated. All NOT NULL columns from the base table must be included in the view in order for the INSERT query to function.
SQL> SELECT * FROM EMPLOYEE; DELETION OF VIEW: Rows of data can be deleted from a view. The same rules that apply to the UPDATE and INSERT commands apply to the DELETE command. DELETE STATEMENT SYNTAX: SQL> DELETE <VIEW_NMAE>WHERE <COLUMN NMAE> =’VALUE’; Command: SQL> DELETE FROM EMPVIEW WHERE EMPLOYEE_NAME='SRI'; 1 row deleted. SQL> SELECT * FROM EMPVIEW; UPDATE STATEMENT: A view can be updated under certain conditions: The SELECT clause may not contain the keyword DISTINCT. The SELECT clause may not contain summary functions. The SELECT clause may not contain set functions. The SELECT clause may not contain set operators. The SELECT clause may not contain an ORDER BY clause. The FROM clause may not contain multiple tables. The WHERE clause may not contain subqueries. The query may not contain GROUP BY or HAVING. Calculated columns may not be updated. All NOT NULL columns from the base table must be included in the view in order for the INSERT query to function.
record-exp5.docx