Wednesday, July 6, 2011

Views

What Is a View?
  • A view is nothing but a window of an existing table by which one can view and can also change the values in tables. 
  • The main point aspect of view is views have no storage space. For this reason views are also called as virtual tables. 
  • Thus in other words a view is a database object that gives a logical representation of one or more database tables.
Advantages of Views
  • To restrict data access.
  • To make complex queries easy.
  • To provide data independence.
  • To present different views of the same data.
Simple Views and Complex Views

FeatureSimple ViewsComplex Views
Number of TablesOneOne or more
Contain FunctionsNoYes
Contain Group of DataNoYes

Friday, December 18, 2009

ALTER TABLE Statement

ALTER TABLE Statement :
  • Use the ALTER TABLE statement to :
    – Add a new column
    – Modify an existing column
    – Define a default value for the new column
    – Drop a column
Dropping a Table :
  • All data and structure in the table are deleted.
  • Any pending transactions are committed.
  • All indexes are dropped.
  • All constraints are dropped.
  • You cannot roll back the DROP TABLE statement.
  • DROP TABLE dept30;

Followers