-- View
-- A view is a logical table. It is used to view tables and define multiple connections between rows and columns from one or more tables. You can view the data in the table through the view.
-- Create a view
Create view mytest. v_info
(ID, name, loginname, address)
As
Select Test. ID, test. Name, test. loginname, info. Address from test, info where info. info_id = test. ID
-- View
Select * From v_info
-- Insert a column for the info table
Alter table info add Tel varchar2 (20 );
-- Modify View
-- There is no statement to modify the view separately. The statement used to modify a view is different from the statement used to create a view.
-- If you use create on replace view, the specified view must exist. Otherwise, the system will create the view.
Create or replace view mytest. v_info
(ID, name, loginname, address, TEL)
As
Select Test. ID, test. Name, test. loginname, info. Address, info. Tel from test, info where info. info_id = test. ID
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service