select   trunc(to_number(2002||'.'||555),2)   from   dual;   

解决方案 »

  1.   

    select to_char(a)+'.'+to_char(b) as c from table;select trunc(a,2) as d from table;
      

  2.   

    笨啊,你非要我把下面的语句拆成两条才算得上回答你的两个问题么
    select   trunc(to_number(a¦ ¦'.' ¦ ¦b),2)   from   table;  
      

  3.   

    其中:num表中的字段属性如下:
    列名  数据类型   长度   允许空
    id   int       4      no
    num1 real      4      yes
    num2 real      4      yes
    num3 real      4      yes去数据库里面执行下如下的存储过程就ok了!           proc_num CREATE PROCEDURE proc_num 
    AS
    declare @num  float
    declare @i  float
    declare @str char(20)
    declare @num_temp float
    set @i=1
    set @num_temp=0
    select @num=count(*)  from num 
    while(@i<=@num)
    begin
    select @num_temp= num1+(num2+0.0)/power(10,len(num2))  from num where id=@i
    --select @num_temp
    update num set num3=@num_temp where id=@i
    set @i=@i+1

    end
    GO
      

  4.   

    ORACLE中通过
    select to_char(a)||'.'||to_char(b) c from vip_leaveword