1. select * from p_table where OpenTime > sysdate;
2.  select * from  p_table where LogTime > to_char(sysdate,'yyyy-mm-dd hh24:mi:ss');
3. delcare 
     i integer :=2;
     T date;
begin
       select sysdate-i into T from dual;
end;4.
declare  s varchar(200);begin
  s := 'select * from TB';
  dbms_output.put_line(s);end;

解决方案 »

  1.   

    1. select * from p_table where OpenTime > sysdate;
    2.  select * from  p_table where LogTime > to_char(sysdate,'yyyy-mm-dd hh24:mi:ss');
    3. delcare 
         i integer :=2;
         T date;
    begin
           select sysdate-i into T from dual;
    end;4.
    declare  s varchar(200);begin
      s := 'select * from TB';
      dbms_output.put_line(s);end;
    谢谢,
    但是第三个问题报错。
      

  2.   

    1. select * from p_table where OpenTime > sysdate;
    2.  select * from  p_table where LogTime > to_char(sysdate,'yyyy-mm-dd hh24:mi:ss');
    3. delcare 
         i integer :=2;
         T date;
    begin
           select sysdate-i into T from dual;
    end;4.
    declare  s varchar(200);begin
      s := 'select * from TB';
      dbms_output.put_line(s);end;
    谢谢,
    但是第三个问题报错。declare
      i integer := 2;
      T date;
    begin
      select sysdate - i into T from dual;
      dbms_output.put_line(T);
    end;
      

  3.   

    1. select * from p_table where OpenTime > sysdate;
    2.  select * from  p_table where LogTime > to_char(sysdate,'yyyy-mm-dd hh24:mi:ss');
    3. delcare 
         i integer :=2;
         T date;
    begin
           select sysdate-i into T from dual;
    end;4.
    declare  s varchar(200);begin
      s := 'select * from TB';
      dbms_output.put_line(s);end;
    谢谢,
    但是第三个问题报错。declare
      i integer := 2;
      T date;
    begin
      select sysdate - i into T from dual;
      dbms_output.put_line(T);
    end;输出结果是这个:02-6月 -14
    不能和select sysdate -2 into T from dual ; 等效吗?
      

  4.   


    谢谢,
    但是第三个问题报错。declare
      i integer := 2;
      T date;
    begin
      select sysdate - i into T from dual;
      dbms_output.put_line(T);
    end;输出结果是这个:02-6月 -14
    不能和select sysdate -2 into T from dual ; 等效吗?
    怎么等效?输出的结果就是SQL求出的结果啊