Results 1 to 2 of 2

Thread: Extract Function

  1. #1
    Expert Member
    Join Date
    Sep 2007
    Answers
    697

    Extract Function

    We can get YEAR | MONTH | DAY | HOUR | MINUTE | SECOND values using To_char Function also. Where do we use this extract function? Could anyone please me give an example of the situation where can't use T0_char function and get result only by using extract function?


  2. #2
    Expert Member
    Join Date
    Apr 2007
    Answers
    500

    Re: Extract Function

    The extract function extracts a value from a date or interval value
    example
    SELECT
    EXTRACT(year FROM systimestamp) ,EXTRACT(month FROM systimestamp),
    EXTRACT(day FROM systimestamp) ,EXTRACT(hour FROM systimestamp),
    EXTRACT(minute FROM systimestamp),EXTRACT(second FROM systimestamp),
    EXTRACT(timezone_hour FROM systimestamp) ,EXTRACT(timezone_minute FROM systimestamp) ,EXTRACT(timezone_region FROM systimestamp) ,
    EXTRACT(timezone_abbr FROM systimestamp)
    FROM dual;

    For ur second question pls follow this link


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact