2 baozhadehulu baozhadehulu 于 2016.05.06 17:54 提问

有关pl/sql编程的简单问题
 declare 
  my_name VARCHAR2(10):='张三';
begin
  if length(my_name)<=2 THEN
    dbms_output.put_line('我的名字是两个字!');
end;

图片说明

2个回答

lonlong9
lonlong9   2016.05.06 19:09
已采纳

缺少'end if;'

baozhadehulu
baozhadehulu declare type v_record is RECORD ( v_name emp.ename% TYPE; v_salary emp.sal% TYPE; v_job emp.job% TYPE; v_deptno emp.deptno% TYPE; ); staff v_record; begin select ename,sal,job,deptno into staff from emp where empno=7788; dbms_output.put_line(staff.v_name||' '||staff.v_salary||' '||staff.v_job||' '||staff.v_deptno); end;
一年多之前 回复
baozhadehulu
baozhadehulu 能再问您一个问题吗?
一年多之前 回复
baozhadehulu
baozhadehulu   2016.05.06 19:23
 declare
  type v_record is RECORD
  (
    v_name emp.ename% TYPE;
    v_salary emp.sal% TYPE;
    v_job emp.job% TYPE;
    v_deptno emp.deptno% TYPE;
  );
  staff v_record;
begin
  select ename,sal,job,deptno into staff from emp where empno=7788;
  dbms_output.put_line(staff.v_name||' '||staff.v_salary||' '||staff.v_job||' '||staff.v_deptno);
end;

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!