用 cur子使用记录,然后按表格分列。
DECLARE CURSOR emp_cur IS
SELECT employee_id, first_name|| || last_name "name"
FROM employees
ORDER BY salary desc;
emp_rec emp_cur%ROWTYPE;
BEGIN
FOR emp_rec IN emp_cur
LOOP
DBMS_OUTPUT.PUT_LINE( Employee ID: ||emp_rec.employee_id||CHR(10)||
Employee Name: ||emp_rec.name);
EXIT WHEN emp_cur%ROWCOUNT = 10;
END LOOP;
END;
当我凌驾于法典之上时,我会发现:
ERROR at line 13, "NAME" must be declared.
我如何能够进入第一栏——姓名在座右边——姓名? 或者我是否只得做传统的欧安普林、简单的 lo、快乐和关闭?