Select the best answer
for each question. After completing the quiz, check your answers using
the answer key in the appendix.
-
Which of the following
statements is false regarding a PROC SQL view?
-
A view cannot be used
in a join.
-
A view accesses the
most current underlying data.
-
A view follows the same
naming conventions as a table.
-
A view can be used in
SAS programs in place of an actual SAS data file.
-
Which of the following
statements describes an advantage of using a PROC SQL view?
-
Views often save space,
because a view is usually quite small compared with the data that
it accesses.
-
Views prevent users
from continually submitting queries to omit unwanted columns or rows.
-
Views hide complex joins
or queries from users.
-
-
Which PROC SQL step
creates a view that queries the table Sasuser.Payrollmaster?
-
proc sql;
insert into sasuser.newview
select * from sasuser.payrollmaster;
-
proc sql;
create sasuser.newview as
select * from sasuser.payrollmaster;
-
proc sql;
create view sasuser.newview as
select * from sasuser.payrollmaster;
-
proc sql;
select * from sasuser.payrollmaster
into view sasuser.newview;
-
Which of the following
PROC SQL steps enables you to see a description of the view definition?
-
proc sql;
select * from sasuser.payrollmasterv;
-
proc sql;
describe view sasuser.payrollmasterv;
-
proc sql;
list sasuser.payrollmasterv;
-
proc sql;
contents view=sasuser.payrollmasterv;
-
Which PROC SQL step
correctly references the view Data.Empview?
-
proc sql;
select *
from data.empview;
-
proc sql;
select *
from view data.empview;
-
proc sql;
select view *
from data.empview;
-
proc sql;
select *
from data
where view='empview';
-
Which of the following
PROC SQL steps correctly embeds a LIBNAME statement with a view definition?
-
proc sql;
insert into sasuser.newview
select * from airline.supervisors
libname airline 'c:mysql';
-
proc sql;
create view sasuser.newview as
from airline.supervisors
embed libname airline 'c:mysql';
-
proc sql;
using airline 'c:mysql';
insert into sasuser.newview
select * from airline.supervisors;
-
proc sql;
create view sasuser.newview as
select * from airline.supervisors
using libname airline 'c:mysql';
-
PROC SQL views can access
data from:
-
-
-
a relational database
table.
-
-
When you are working
with PROC SQL views, it is best to:
-
avoid using an ORDER
BY clause in a view.
-
avoid creating views
that are based on tables whose structure might change.
-
specify a one-level
name in the FROM clause if the view resides in the same SAS library
as the contributing table(s).
-
-
You can update the data
underlying PROC SQL view using the INSERT, DELETE, and UPDATE statements
under which of the following conditions:
-
The view is joined or
linked to another table.
-
The view contains a
subquery.
-
The view contains a
WHERE clause.
-
-
Which of the following
programs drops (deletes) a view?
-
proc sql;
delete sasuser.newview;
-
proc sql;
drop view sasuser.newview;
-
proc sql;
erase view sasuser.newview;
-
proc sql;
remove newview from sasuser;