[Info-Ingres] Is there a long data type in Ingres ?
Grant Croker
grant.croker at ingres.com
Tue Aug 14 04:46:15 CDT 2007
On 14/08/07 11:29, David Greenberg scribbled:
> Hi
> The date data type in Ingres contains the date and time in the format of
> hh:mm:ss.
> Is there a longer data type that would contain also tenths of seconds ,
> hh:mm:ss.aaa ? (similar tot datetime data type of SqlServer)
>
Hi David,
Ingres 2006 r2 and later have support for timestamps with a second
precision up to 9 decimal places, i.e. hh:mm:ss.aaaaaaaaa, as
demonstrated by the following SQL:
/* timestamp(n) where n is value from 0 to 9 */
create table timestamps ( index integer not null, timestamp timestamp(3)
not null)\p\g
insert into timestamps values (1, '2007-02-08 16:41:00.12345')\p\g
insert into timestamps values (2, '2007-02-08 16:41:00.54321')\p\g
select * from timestamps\p\g
Executing . . .
┌─────────────┬───────────────────────────────────────┐
│index │timestamp │
├─────────────┼───────────────────────────────────────┤
│ 1│2007-02-08 16:41:00.123 │
│ 2│2007-02-08 16:41:00.543 │
└─────────────┴───────────────────────────────────────┘
(2 rows)
continue
*
See http://docs.ingres.com/sqlref/UnderstandingSQLDataTypes for more info.
regards
grant
--
Grant Croker, grantc at php.net
Software Engineer, Ingres - http://ingres.com
tel: +44 (0)1753 559505 UK / +34 676 518209 España
--
"When it's time to stop living, I will certainly make Death my number one
choice!"
-- (Terry Pratchett, The Last Continent)
More information about the Info-Ingres
mailing list