C H A P T E R
5
Advaned SQL
Solutions for the Pratie Exerises of Chapter 5
Pratie Exerises
5.1
Answer:
It prints out the manager of dog, t hat manager's manager, et., until we reah
a manager who has no manager (presumably, the CEO, who most er t ainly is a
at). Note: If you tr y to r un this, use your own Orale ID and password.
5.2
Answer:
Please see Figure 5.101
5.3
Answer:
Please see Figure 5.102
5.4
Answer:
Wr iting queries in
SQL
is typially muh easier than oding t he same queries
in a general-pur pose programming language. However, not all kinds of quer ies
an be written in
SQL
. Also, nondelarative ations suh as printing a repor t,
interating with a user, or sending the results of a quer y to a graphial user inter-
fae annot be done from wit hin
SQL
. Under irumstanes in whih we want
the best of both worlds, we an hoose embedded
SQL
or dynami
SQL
, rather
than using
SQL
alone or using only a general-purpose programming language.
5.5
Answer:
29
评论0