Search code examples
sqloracledatetimeoracle-sqldeveloper

How to do simple sql requests on sql developer linux?


I installed sqldelevoper on linux and try to do some simple sql requests.

When i try to get current date:

select date(now());

I got an error:

"ORA-00936: missing expression."

I have no idea what am i doing wrong, i can't normal work with DATE type.


Solution

  • You seem to be running a MySQL query (or the like) in Oracle. The equivalent would be:

    select trunc(sysdate) from dual
    

    Note that in MySQL, you could phrase this simply as:

    select current_date