Thursday, 12 February 2015

Teradata Simple Views and Complex Views

A view is a part of base table or base tables. Many reasons we can use Views.

1. Views with aggregate data we can use
2. Reduce complexity, so that less SQL skill is required to use views
3. Like any other base table, we can not Alter views
4. We use REPLACE option to alter views

View can be dropped:

DROP VIEW view_name;

Before going into indepth of Views, some rules are there to create View:
  • Should NOT use ORDER BY either on a view or base table in CREATE VIEW query
  • Indexes- we shoud not
  • Always give Alias to Aggregtate/Derived column names

Simple View: A view is created from a base table without any functions or Joins

Complex View: A view is created with Aggregate functions, Joins, Derived data, DISTINCT, GROUP BY will be treated as Complex view.

1 comment:

  1. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Teradata , kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on Teradata. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.

    For Free Demo Contact us:
    Name : Arunkumar U
    Email : arun@maxmunus.com
    Skype id: training_maxmunus
    Contact No.-+91-9738507310
    Company Website –http://www.maxmunus.com


    ReplyDelete