几道sql的题目 有大神帮忙解答吗?

Directions:Identifythevocabularywordforeachdefinitionbelow:1.________________________... Directions: Identify the vocabulary word for each definition below:
1. _________________________ Declares a record with the same fields as the cursor on
which it is based.
2. _________________________ A composite data type in PL/SQL, consisting of a number
of fields each with their own name and data type.
3. _________________________ Returns the status of the cursor.
4. _________________________ An attribute that processes an exact number of rows or
counts the number of rows fetched in a loop.
5. _________________________ An attribute used to determine whether the most recent
FETCH statement successfully returned a row.
Try It/Solve It
1. In your own words, explain the advantage of using %ROWTYPE to declare a record
structure based on a cursor declaration.
2. Write a PL/SQL block to read through rows in the wf_countries table for all countries in
region 5 (South America region). For each selected country, display the country_name,
national_holiday_date, and national_holiday_name. Use a record structure to hold all the
columns selected from the wf_countries table.
Hint: This exercise is very similar to question 4G in the previous lesson. Use your solution as
a starting point for this exercise.
3. For this exercise, you use the employees table. Create a PL/SQL block that fetches and
displays the six employees with the highest salary. For each of these employees, display the
first name, last name, job id and salary. Order your output so that the employee with the
highest salary is displayed first. Use %ROWTYPE and the explicit cursor attribute
%ROWCOUNT.
4. Look again at the block you created in question 3. What if you wanted to display 21
employees instead of 6? There are only 20 rows in the employees table. What do you think
would happen?
5. In real life we would not know how many rows the table contained. Modify your block from
question 3 so that it will exit from the loop when either 21 rows have been fetched and
displayed, or when there are no more rows to fetch. Test the block again.
展开
 我来答
变形的水6e
2016-10-20 · TA获得超过264个赞
知道答主
回答量:255
采纳率:0%
帮助的人:75.9万
展开全部
液刑事檬 yfzhuoa926
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式