Assignment 8
Assignment 8
Practical # 8
1. The DBA stores the views as a definition only. Hence there is no duplication of data.
2. Simplifies Queries.
3. Can be Queried as a base table itself.
4. Provides data security.
5. Avoids data redundancy.
Creation of Views:-
Syntax:-
CREATE VIEW viewname AS
SELECT columnname,columnname
FROM tablename
WHERE columnname=expression_list;
Renaming the columns of a view:-
Syntax:-
CREATE VIEW viewname AS
SELECT newcolumnname….
FROM tablename
WHERE columnname=expression_list;
Syntax:-
SELECT columnname, columnname
FROM viewname
WHERE search condition;
Destroying a view-
Syntax:-
DROP VIEW viewname;
Assignment No # 8