SQL里面的 a:=4 这个样子是啥意思?

解决方案 »

  1.   

    调用包含out/ in out类型参数的存储过程
      
      存储过程:
      
      CREATE OR REPLACE PROCEDURE "SITE_EDITSITEDATAEXIST"
      
      (id_ number,
      
      name_ varchar2,
      
     
      httpRoot_ varchar2,
      
      flag out integer )//out 只具备输出功能 in out 为输入/输出型
      
      as
      
      tempNum integer;
      
      begin
      
      flag:=0;
      
      select count(id) into tempNum from WebSite_Info where Name = name_ and ID<>id_;
      
      if tempNum > 0 then
      
      flag:=3;
      
      end if;
      
      select count(id) into tempNum from WebSite_Info where HttpRoot = HttpRoot_ and ID<>id_;
      
      if tempNum > 0 then
      
      flag:=4;
      
      end if;
      
      commit;
      
      end ;
      
      /也就是说上面的存储过程中,出现flag:=的地方就是给flag变量赋值
      

  2.   

    等號前加“:”,這是oracle变量赋值寫法,其它沒有兩樣了
      

  3.   

    ORACLE的赋值语句 ,像Pascal语言和Dephi语言类似,用a:=X来赋值。