RE: table definitions
Posted in 2001
Topics: Server Administration, Data Types & Schema Design
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C08659.4F8D15C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Walter: In informix, datetime columns can have different subtypes Generally you have: Datetime <From> to <To> Where <From> and <To> can be any of: year, month, day, hour, minute, = second, fraction(N) So=20 Datetime year to second will declare a column to store the year, the = month, the day, the hour and the seconds, datetime month to day will declare a column to store the month and the = day datetime hour to fraction(3) will declare a column to store the hour, = the seconds and 3 decimal places for the seconds Hope that helps Sebasti=E1n Streiger Departamento Sistemas Red Megatone sstreige@redmegatone.com -----Mensaje original----- De: Walter T Rejuney [mailto:BlueSax@Unforgetable.com] Enviado el: Mi=E9rcoles, 24 de Enero de 2001 05:06 p.m. Para: informix-list@iiug.org Asunto: table definitions I am an Oracle DBA trying to port an Informix application to Oracle and I've come across something in a table definition that I'm not sure about. In the table creation script there is a column defined like this: creation_timestamp datetime year to second yes Now, I can figure out that the name of the column is "creation_timestamp" and that the data type of the colum is "datetime" and that the "yes" means that nulls are allowed - but what does the "year to second" do? Does it provide a default value to the column? ------_=_NextPart_001_01C08659.4F8D15C0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Diso-8859-1"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 5.5.2650.12"> <TITLE>RE: table definitions</TITLE> </HEAD> <BODY> <P><FONT SIZE=3D2>Walter:</FONT> <BR> <FONT SIZE=3D2>In = informix, datetime columns can have different subtypes</FONT> <BR> <FONT SIZE=3D2>Generally = you have:</FONT> <BR> <FONT SIZE=3D2>Datetime = <From> to <To></FONT> </P> <P><FONT SIZE=3D2>Where <From> and <To> can be any of: = year, month, day, hour, minute, second, fraction(N)</FONT> </P> <P><FONT SIZE=3D2>So </FONT> <BR><FONT SIZE=3D2> Datetime year to second will declare a column = to store the year, the month, the day, the hour and the seconds,</FONT> <BR><FONT SIZE=3D2> datetime month to day will declare a column to = store the month and the day</FONT> <BR><FONT SIZE=3D2> datetime hour to fraction(3) will declare a = column to store the hour, the seconds and 3 decimal places for = the seconds</FONT></P> <P><FONT SIZE=3D2>Hope that helps</FONT> </P> <BR> <P><FONT SIZE=3D2>Sebasti=E1n Streiger</FONT> <BR><FONT SIZE=3D2>Departamento Sistemas</FONT> <BR><FONT SIZE=3D2>Red Megatone</FONT> <BR><FONT SIZE=3D2>sstreige@redmegatone.com</FONT> </P> <BR> <P><FONT SIZE=3D2>-----Mensaje original-----</FONT> <BR><FONT SIZE=3D2>De: Walter T Rejuney [<A = HREF=3D"mailto:BlueSax@Unforgetable.com">mailto:BlueSax@Unforgetable.com= </A>]</FONT> <BR><FONT SIZE=3D2>Enviado el: Mi=E9rcoles, 24 de Enero de 2001 05:06 = p.m.</FONT> <BR><FONT SIZE=3D2>Para: informix-list@iiug.org</FONT> <BR><FONT SIZE=3D2>Asunto: table definitions</FONT> </P> <BR> <P><FONT SIZE=3D2>I am an Oracle DBA trying to port an Informix = application to Oracle and</FONT> <BR><FONT SIZE=3D2>I've come across something in a table definition = that I'm not sure</FONT> <BR><FONT SIZE=3D2>about.</FONT> </P> <P><FONT SIZE=3D2>In the table creation script there is a column = defined like this:</FONT> </P> <P><FONT SIZE=3D2>creation_timestamp datetime year to = second = yes</FONT> </P> <P><FONT SIZE=3D2>Now, I can figure out that the name of the column = is</FONT> <BR><FONT SIZE=3D2>"creation_timestamp" and that the data = type of the colum is "datetime"</FONT> <BR><FONT SIZE=3D2>and that the "yes" means that nulls are = allowed - but what does the</FONT> <BR><FONT SIZE=3D2>"year to second" do? Does it provide a = default value to the column?</FONT> </P> </BODY> </HTML> ------_=_NextPart_001_01C08659.4F8D15C0--
Thanks to everyone. This helps. I thought at first that it was providing a default value, but after looking at the table itself I've figure out that the datetime columns are always null because the original implementer never used them.