A view is like a window in a datasheet, after an administrator defines the location of the windows, the user can only view the data that he can see. A view is not a datasheet, it is just a collection of SQL query statements that extract different data from the datasheet according to different requirements.
How to create a view
(1) as shown in Figure 7.52.
(2) appear as shown in Fig. 7.53, ㄊ oil, envy, Ⅰ, ∠ and ā?br>
(3) switch to the "Advanced" tab of the Create view as shown in Figure 7.54.
(4) After the successful creation of the view, the interface shown in Figure 7.55 appears. Click the OK button.
(5) You can view the created view in Enterprise Manager, as shown in Figure 7.56.
(6) The SQL code to create the view above is as follows.
―――――――――――――――――――――――――――――――――――――
CREATE OR REPLACE VIEW "SCOTT". " Student Datasheet View "as"
Select Student_id,name
From Scott.student and READ only
―――――――――――――――――――――――――――――――――――――
"See CD files": \ 7th chapter \ Createview.sql.
(7) The reader can also execute the Createview.sql file to complete the creation of the view directly in "Sqlplus Worksheet", as shown in Figure 7.57.
How to query the data for a view
(1) as shown in Figure 7.56.
(2) The Content Viewer interface appears as shown in Figure 7.58. Shows the corresponding data for the view.
(3) The corresponding SQL code for the above process is as follows.
―――――――――――――――――――――――――――――――――――――
Select "SCOTT". " Student Datasheet view "." Student_id ",
"SCOTT". " Student Datasheet view "." NAME "
From "SCOTT". " Student Datasheet view
―――――――――――――――――――――――――――――――――――――
"See CD files": \ 7th chapter \ Selectview.sql.
(4) The reader can also perform a query that Selectview.sql file completion view directly in "Sqlplus Worksheet", as shown in Figure 7.59.
How to delete a view
(1) as shown in Figure 7.56.
(2) The View deletion confirmation interface appears as shown in Figure 7.60.
(3) In this way, the view is successfully deleted.
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.