> set serveroutput on
> set autoprint on;
> declare
> v_first_name employees.first_name%type;
> v_street_address locations.street_address%type;
> v_city locations.city%type;
> v_postal_code locations.postal_code%type;
> begin
> select employee_id first_name,street_address,city,postal_code into:b_employee_id,v_first_name,v_street_address,v_city,v_postal_code
>
> from employees natural join locations
> where employee_id=156; // how to get employee_id stored in b_employee_ud
> dbms_output.put_line('the employee'||v_first_name ||' is located at:'||v_street_address|| v_city ||v_postal_code );
> end;
> /
收到错误错误报告:ORA-06550:第 7 行,第 134 列:PL/SQL:ORA-00913:值太多 ORA-06550:第 7 行,第 1 列:PL/SQL:SQL 语句被忽略 06550。00000 -“行 % s,列 %s:\n%s" *原因:通常是 PL/SQL 编译错误。*行动:
b_employee_id
156
我想使用存储在 b_employee_id 中的employee_id