问几个个SQL sever语句,怎么转化为ORACLE
问几个个SQL sever语句,如何转化为ORACLE
1、select * from p_table where OpenTime > getdate(). //OpenTime 是时间类型
2、select * from p_table where LogTime > CONVERT(VARCHAR(10),getdate(),120) //LogTime 是字符串类型
3、delcare @i int
set @i =2
select getdate()-@i AS T
4.SQL sever 中的PRINT,在ORACLE 有没有?
delcare @s varchar(200)
set @s='select * from TB'
print @s
谢谢!
------解决方案--------------------
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、select * from p_table where OpenTime > getdate(). //OpenTime 是时间类型
2、select * from p_table where LogTime > CONVERT(VARCHAR(10),getdate(),120) //LogTime 是字符串类型
3、delcare @i int
set @i =2
select getdate()-@i AS T
4.SQL sever 中的PRINT,在ORACLE 有没有?
delcare @s varchar(200)
set @s='select * from TB'
print @s
谢谢!
------解决方案--------------------
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;