等于在pl/sql里是怎么用的?比如x小与3可以写成:   x < 3
x等于3我试了下 x = 3, x == 3 都不行啊。 谢谢了。

解决方案 »

  1.   

    x等于3应该写成x:=3,这个是赋值,如果是比较,那就是用x=3啊
      

  2.   

    qing wen lou shang neng bu neng bang wo kan xia na li cuo le?declare
    begin
    for x in 0..10 loop
    dbms_output.put_line(x);
    if x > 5 then
    dbms_output.put_line(x || ' is less than 5');
    elseif x = 5 then
    dbms_output.put_line(x || ' is equals 5');
    else
    dbms_output.put_line(x || ' is greate than 5');
    end if;
    end loop;
    end;
      

  3.   

    declare 
    begin 
    for x in 0..10 loop 
    dbms_output.put_line(x); 
    if x > 5 then 
    dbms_output.put_line(x || ' is less than 5'); 
    elsif x = 5 then 
    dbms_output.put_line(x || ' is equals 5'); 
    else 
    dbms_output.put_line(x || ' is greate than 5'); 
    end if; 
    end loop; 
    end;语法错误