Chapter 7: Creating And Managing Views Using Proc SQL

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Moxleyv
M
Moxleyv
Community Contributor
Quizzes Created: 38 | Total Attempts: 21,992
| Attempts: 125 | Questions: 10
Please wait...
Question 1 / 10
0 %
0/100
Score 0/100
1. PROC SQL views can access data from

Explanation

PROC SQL views can access data from a SAS data file, a DATA step view, a PROC SQL view, or a relational database table.

Submit
Please wait...
About This Quiz
Chapter 7: Creating And Managing Views Using Proc SQL - Quiz

This quiz in Chapter 7 focuses on creating and managing views using PROC SQL. It tests understanding of view operations, such as creation, joining, and querying, enhancing skills in database management and SQL programming.

Tell us your name to personalize your report, certificate & get on the leaderboard!
2. Which of the following PROC SQL steps enables you to see a description of the view definition?

Explanation

The DESCRIBE VIEW statement displays the view definition in the SAS log.

Submit
3. Which of the following statements describes an advantage of using a PROC SQL view?

Explanation

PROC SQL views are useful because they

often save space (a view is usually quite small compared with the data that it accesses)

prevent users from continually submitting queries to omit unwanted columns or rows

hide complex joins or queries from users.

In addition, PROC SQL views

ensure that input data sets are always current, because data is derived from tables at execution time

can be used to shield sensitive or confidential columns from users while enabling the same users to view other columns in the same table.

Submit
4. Which of the following programs drops (deletes) a view?

Explanation

The DROP VIEW statement drops a view from the specified library.

Submit
5. Which PROC SQL step creates a view that queries the table Sasuser.Payrollmaster?

Explanation

You use the CREATE VIEW statement to create a view. The keywords CREATE VIEW are followed by the name of the view and the keyword AS.

Submit
6. When you are working with PROC SQL views, it is best to

Explanation

When you are working with PROC SQL views, it is best to

avoid using an ORDER BY clause in a view. If you specify an ORDER BY clause, the data must be sorted each time the view is referenced.

avoid creating views that are based on tables whose structure might change. A view is no longer valid when it references a nonexistent column.

specify a one-level name in the FROM clause if the view resides in the same SAS data library as the contributing table(s). Using a one-level name in the FROM clause prevents you from having to change the view if you assign a different libref to the SAS data library that contains the view and its contributing table or tables.

Submit
7. Which PROC SQL step correctly references the view Data.Empview?

Explanation

A view can be used in a PROC SQL step just as you would use an actual SAS table.

Submit
8. Which of the following PROC SQL steps correctly embeds a LIBNAME statement with a view definition?

Explanation

The USING clause enables you to embed a LIBNAME statement in your view definition. The USING clause must be the last clause in the CREATE VIEW statement.

Submit
9. Which of the following statements is false regarding a PROC SQL view?

Explanation

A PROC SQL view accesses the most current underlying data and can be joined with tables or other views. In addition, a PROC SQL view can

be used in SAS programs in place of an actual SAS data file

be derived from one or more tables, PROC SQL views, or DATA step views.

Submit
10. You can update the data underlying PROC SQL view using the INSERT, DELETE, and UPDATE statements under which of the following conditions:

Explanation

You can update a PROC SQL view provided that the view does not join or link to another table, the view does not have a subquery, or you try to update a derived column. You can update a view that contains a WHERE clause. The WHERE clause can be in the UPDATE clause or in the view. You cannot update a view that contains any other clause such as an ORDER BY or a HAVING clause.

Submit
View My Results

Quiz Review Timeline (Updated): Jul 23, 2024 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Jul 23, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Mar 13, 2013
    Quiz Created by
    Moxleyv
Cancel
  • All
    All (10)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
PROC SQL views can access data from
Which of the following PROC SQL steps enables you to see a description...
Which of the following statements describes an advantage of using a...
Which of the following programs drops (deletes) a view?
Which PROC SQL step creates a view that queries the...
When you are working with PROC SQL views, it is best to
Which PROC SQL step correctly references the view Data.Empview?
Which of the following PROC SQL steps correctly embeds a LIBNAME...
Which of the following statements is false regarding a PROC SQL view?
You can update the data underlying PROC SQL view using the INSERT,...
Alert!

Advertisement