Re: SQL Date help
От | Karel Zak |
---|---|
Тема | Re: SQL Date help |
Дата | |
Msg-id | 20010326105806.C19983@ara.zf.jcu.cz обсуждение исходный текст |
Ответ на | SQL Date help ("waheed_rahuman" <waheed_rahuman@yahoo.com>) |
Список | pgsql-sql |
On Mon, Mar 26, 2001 at 12:24:07PM +0400, waheed_rahuman wrote: > > > Hi, > > I am a newbie to SQL and postgresql too. > please guide me in the following... Any problem with documentation? > 1.How i can create date while i am inserting into the table ,in which the > field is date data type.(date should not be a current date and its should be > created > as in java date(int,int,int) INSERT INTO xxx VALUES (now());INSERT INTO xxx VALUES ('2000-01-01'); > 2. How i can compare the date field. via standard operators, en example '<' '>' '=' 'between' ..etc. > For example , > how i can get the all the records between to two dates SELECT .... WHERE col BETWEEN '2000-01-01' AND '2001-01-01';Please(!), see http://www.postgresql.org/users-lounge/docs/7.0/user/datatype.htm http://www.postgresql.org/users-lounge/docs/7.0/user/operators.htm http://www.postgresql.org/users-lounge/docs/7.0/user/operators2373.htm Karel -- Karel Zak <zakkr@zf.jcu.cz>http://home.zf.jcu.cz/~zakkr/C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
В списке pgsql-sql по дате отправления: