8th Day of Oracle Learning

Source: Internet
Author: User
Tags mssql

Really do not want to write, but still have to force themselves to learn a little every day, write a little. I didn't play tonight, and when I got home, I was called on the line to deal with things, take some time to learn some Oracle

1, character functions, there are upper, LOWER, Initcap (capital letter), REPLACE, LENGTH, SUBSTR, ASCII, CHR, Rpad, Lpad, LTRIM, RTRIM, TRIM, INSTR (whether the substring appears at the specified position)

2, Verification of virtual table: dual, specifically used for verification, testing (direct select not? Must be from DUAL? Try it later)

3, numeric functions: ROUND, TRUNC (reserved refers to the positioning of decimals, you can also set a negative value to erase the integer digits), MOD

4, the current time: Sysdate,mssql is getdate ()

5, Time plus minus: Oracle can directly add and subtract sysdate, really convenient, MSSQL seems to have to pass DateAdd and so on.

Oracle also has corresponding functions, such as Add_months,next_day, Last_day, Months_between

There is a extract, the syntax is more complex, take out the date of the month day

Time stamp: To_timestamp, time-saving int is superior in performance

6. Conversion function: To_char, to_date, To_number

7. General functions:

NVL: The equivalent of MSSQL IsNull, NVL2 is the enhanced version, you can return the specified value.

Nullif (A, B): Determine if AB is equal, equal return null, unequal return a

DECODE, case when, coalesce: all are conditional judgment

Really good, persist and learn a chapter, did not insist on the words and play a night

8th Day of Oracle Learning

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.