[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Oracle Timestamp size ?

Posted on 2006-06-16
5
Medium Priority
?
5,495 Views
Last Modified: 2008-01-09
Hi,
I have an Oracle (9.2.0) table column that is of type Timestamp...

The DBA declared it as:

ColumnName      Type
CREATETMS       Timestamp(6)

My question is: what does this mean?     Timestamp(6)  ?
Give me an example insert value to insert a value to this column??? (should work)
I am having problem updating this Timestamp with new values from my java program....


Thanks.
_Esam.
0
Comment
Question by:_Esam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 11

Accepted Solution

by:
pennnn earned 500 total points
ID: 16923469
From the manual:
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/sql_elements2a.htm#47861
---
The TIMESTAMP datatype is an extension of the DATE datatype. It stores the year, month, and day of the DATE datatype, plus hour, minute, and second values. This datatype is useful for storing precise time values. Specify the TIMESTAMP datatype as follows:

TIMESTAMP [(fractional_seconds_precision)]

where fractional_seconds_precision optionally specifies the number of digits Oracle stores in the fractional part of the SECOND datetime field. When you create a column of this datatype, the value can be a number in the range 0 to 9. The default is 6. When you specify TIMESTAMP as a literal, the fractional_seconds_precision value can be any number of digits up to 9, as follows:

TIMESTAMP'1997-01-31 09:26:50.124'
---
An example of an insert would be:
insert into my_table (timestamp_column) values (timestamp'1997-01-31 09:26:50.124');

Hope that helps!
0
 
LVL 19

Expert Comment

by:actonwang
ID: 16923479
TIMESTAMP [(<precision>)]

The TIMESTAMP datatype stores date and time information with fractional
seconds precision. The only difference between the DATE and TIMESTAMP
datatypes is the ability to store fractional seconds up to a precision of nine digits.
The default precision is 6 and can range from 0 to 9.
0
 

Author Comment

by:_Esam
ID: 16923799
>insert into my_table (timestamp_column) values (timestamp'1997-01-31 09:26:50.124');

Is this part ok:   (timestamp'1997-01-31 09:26:50.124'); ?

Should it just be:   ('1997-01-31 09:26:50.124');


_Esam
0
 

Author Comment

by:_Esam
ID: 16923851
Need an example of how to insert a darn timestamp>>>:)


Thax.
_esam.
0
 

Author Comment

by:_Esam
ID: 16923878
Sorry, I got it working now...:)

Thanks

_Esam..
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question