| From: | Petter Reinholdtsen <pere(at)hungry(dot)com> |
|---|---|
| To: | pgsql-sql(at)postgreSQL(dot)org |
| Subject: | 'now - 4 hours ago' ? |
| Date: | 1998-06-18 17:26:24 |
| Message-ID: | 199806181726.TAA25534@sleeper.games.no |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
I'm still learning SQL. :-)
Now I have upgraded my PostgreSQL database to v6.3.2, and have the
following table.
CREATE TABLE testdate(
received timestamp DEFAULT CURRENT_DATE,
info text NOT NULL
);
I want to select the info received (inserted) more then 4 hours ago.
How do I specify that in SQL? Is timestamp the best datatype for this
kind of query? Which date-types exists in PostgreSQL, and what is the
difference between them. I'll be very happy to get pointers to good
intros. :-)
I'm not on this list, so please send copies to me.
--
##> Petter Reinholdtsen <## | pere(at)td(dot)org(dot)uit(dot)no
O- <SCRIPT Language="Javascript">window.close()</SCRIPT>
http://www.hungry.com/~pere/ | Go Mozilla, go! Go!
| From | Date | Subject | |
|---|---|---|---|
| Next Message | William D. McCoy | 1998-06-18 19:33:04 | converting float4 to float8 |
| Previous Message | Pich LY | 1998-06-18 16:57:09 | FOREIGN KEY ... |