Menu

Sunday, 19 January 2014

Create And Delete View



Creating View

          It just create duplicate table of original’s table and whole data (rows and columns) is same.In figure, View shown.

CREATE VIEW view_name As
SELECT Column_Names
FROM Table_Name
WHERE Conditions

Example-
                       
CREATE VIEW mac As
                        SELECT ename
                        FROM emp
                        WHERE empno=1;


                                                   Figure: suryagroops_001



Delete View
                    DROP VIEW view_name;
Through this query, we can delete view from views.

Example-
                   DROP VIEW mac;

No comments: