Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Crreating Virtual Table using CREATE VIEW statement

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 911
    Comment on it

    CREATING VIEWS:

    Views are virtual tables which are created from other tables .It is beneficial for those situation when we want to show limited columns to users. It can be created from one or more tables.

    Syntax:

    CREATE VIEW viewname AS SELECT column1, column2,.... columnN FROM tablename WHERE (condition);
    

    Example:

    CREATE VIEW EmpVIEW AS SELECT name FROM  EMPLOYEE;
    

    This will be the Ouput for this query:

    Name
    ------------
    Michael
    Joseph
    John

    As we can see from the output the above query will create a view EmpVIEW which will contain only Employee name column, so other columns of Employee table will not show in it. EmpVIEW will only contain name column only.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: