-- drop table.
DROP TABLE T_TIMESTAMP;
-- create test table
CREATE TABLE T_TIMESTAMP (
no number(2) primary key,
st timestamp not null,
ed timestamp not null
);
-- insert data table
INSERT INTO T_TIMESTAMP VALUES(1,systimestamp,systimestamp+1);
INSERT INTO T_TIMESTAMP VALUES(2,systimestamp+1,systimestamp+2);
INSERT INTO T_TIMESTAMP VALUES(3,systimestamp+2,systimestamp+3);
INSERT INTO T_TIMESTAMP VALUES(4,systimestamp+3,systimestamp+4);
commit;
-- select current systimestamp > st and < ed;
--select * from t_timestamp where (systimestamp+1.5) > st and (systimestamp+1.5) < ed;
select * from t_timestamp where systimestamp>=st;
阅读(1479) | 评论(0) | 转发(0) |