Q

Error on "select timestamp" command

When I give the below command, the system is giving me an error. Can you please tell me the syntax?

Here is what I did:

SQL> select timestamp from dual;

select timestamp from dual

       *

ERROR at line 1:

ORA-00904: invalid column name

Your SQL statement is trying to select the TIMESTAMP column from the DUAL table. This table does not contain that column therefore an error is thrown. If you want to see the current time, issue the following query:

SELECT sysdate FROM dual;

If you need this information returned in the TIMESTAMP datatype, you will have to use a function to convert the data:

SELECT to_timestamp(sysdate) FROM dual;
This was first published in December 2004
This Content Component encountered an error

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchSAP

SearchSQLServer

TheServerSide

SearchContentManagement

SearchFinancialApplications

Close