Raw:
[sql]
SELECT SYSTIMESTAMP AS TSTAMP FROM DUAL;
[/sql]
Formatted:
[sql]
SELECT TO_CHAR(SYSTIMESTAMP, ‘DD/MM/YYYY HH24:MI:SS.FF6′) AS TSTAMP FROM DUAL;
[/sql]
Populating a timestamp database field using a current timestamp:
[sql]
INSERT INTO TABLE_NAME(TSTAMP) VALUES ((SELECT SYSTIMESTAMP FROM DUAL));
[/sql]
Or another way is simply to use TO_TIMESTAMP() if the timestamp time is known:
[sql]
INSERT INTO TABLE_NAME(TSTAMP) VALUES (
TO_TIMESTAMP(’3/08/2010 4:38:52.000000 PM’,'fmDDfm/MM/YYYY fmHH12fm:MI:SS.FF AM’)
);
[/sql]