Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2002
    Location
    Cape Town, South Africa
    Posts
    253

    Red face Unanswered: Can anyone convert this Oracle sql to MySQL?

    Hi guys and gals,

    I am doing some integration from Oracle to MySQL and need to know the quivelent MySQL sql for the following Oracle sql:
    Code:
    select trunc(sysdate) from dual
    Basically selecting the current system date without the time part (ie. 13/02/2007).

    Thanks

  2. #2
    Join Date
    Nov 2003
    Posts
    2,933
    Provided Answers: 12
    What's wrong with
    Code:
    SELECT CURDATE()
    See: Date and Time Functions

  3. #3
    Join Date
    Oct 2002
    Location
    Cape Town, South Africa
    Posts
    253
    That simple hey ... I feel like a real idiot.
    Thanks!

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    actually CURRENT_DATE would be better, since it's standard sql

    (you will be less likely to need to change it again if you switch database systems once more)
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •