SQL Views   «Prev 

Create SQL View[Customer]- Exercise Result

You entered:
Remember that you must first create a name for the view, then devise the SELECT statement that will be used for it.
Here is a look at the view statement that will perform the desired functionality. Remember, the name is not important, but the underlying SELECT statement is key.

create view MyView 
as select * from
CustomerInfo, PhoneNumbers
where
CustomerInfo.CustomerID = PhoneNumbers.CustomerID
This will join the results from the tables based on CustomerID and will create a new view named MyView.
You will then be able to issue a single, simple statement to get the results any time:

select * from MyView