0
阙 使用控制结构编写一个程序来显示客户的信用额度。应该要求用户输入客户ID。根据他们的信用额度,应显示以下消息之一。如果员工的信用额度超过$ 4500,将显示最后一条消息。pl/sql控制结构出错
什么是错的这个代码,请回复
declare
v_emp_id employees.employee_id%type;
v_cust_num customers.customers#%type;
v_creditlimit customers.creditlimit%type;
begin
select employee_id ,customer# into v_emp_id ,
v_cust_num from employees natural join customers
where v_emp_id = '&v_emp_id';
if v_creditlimit < 1000 then
dbms_output.put_line ('credit limit less than 1000');
elseif v_creditlimit< 2000 then
dbms_output.put_line ('credit limit less than 2000');
elseif v_creditlimit< 3000 then
dbms_output.put_line ('credit limit less than 3000');
elseif v_creditlimit< 4000 then
dbms_output.put_line ('credit limit less than 4000');
elseif v_creditlimit< 6000 then
dbms_output.put_line ('credit limit less than 6000');
end if;
end;
/
的代码是什么你得到错误? – Incognito
不要使用'NATURAL JOIN'。让那些追随你的人(或那些试图帮助你的人)变得容易并明确指定你的加入标准。谢谢。 –