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