In this lesson you run the DDL to promote the view to the data
server.
To promote the view to the data server:
- Right-click EMP_VIEW and select Generate
DDL.
- In the Generate DDL wizard, ensure that the CREATE
statements check box is selected and click Next.
Although the COMMENT ON statements and GRANT
statements check boxes are selected, no comments are generated
for views and you did not yet grant any authorities on the view. So, no such
SQL statements will be generated.
- Ensure that the Views check box is selected
and click Next.
On the Save and
Run DDL page, the controls are the same ones that appeared when you generated
the DDL for the EMPLOYEE table.
- On the Save and Run DDL page, select the Run DDL on
server check box and click Next.
- Select the Use an existing connection radio
button and click Next.
- Click Finish to generate and run the CREATE
statement. In the Data Output view, you can see that the
CREATE statement ran successfully.
Figure 1. The Data Output view after running
the CREATE statement
In the Database Explorer, expand the connection to the data server
until you see the Schemas folder. Expand that folder
and search for the SCHEMA schema. Expand SCHEMA and
then expand the Views folder to see EMP_VIEW.
- Run a test query on the view by right-clicking the view and selecting Data > Sample
contents.
The results in the Data Output view should be the same as they were
when you ran the SELECT statement from the SQL builder.