你先进入clp状态,
db2start
db2
select time from table where id=1;
看看打出来的样子
1。如果时2003-08-30 **:**:**
时,才使用
SELECT * FROM TABLE WHERE time > 2003-08-30 00:00:00 and time < 2003-08-31 00:00:00
2。你也可以使用
pstmt=conn.PrepareStaments("SELECT * FROM TABLE WHERE time > ? and time < ?");
pstmt.setTimestamp(你的时间1);
pstmt.setTimestamp(你的时间2);