In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Numeric function
1, take the entire function (ceil rounded up, floor rounded down)
Select ceil (66.6) N1 Magnum (66.6) N2 from dual
2, take power (power) and find square root (sqrt)
Select power (3prime2) N1 Magi sqrt (9) N2 from dual
3, ask for the remainder
Select mod (9 dint 5) from dual
4. Returns a fixed number of decimal places (round: rounded, trunc: directly truncated)
Select round (66.667) N1 from dual trunc (66.667) N2
5, the symbol of the return value (positive number returns 1, negative number is-1)
Select sign (- 32), sign (293) from dual
Other functions
1.user:
Returns the name of the logged in user
Select user from dual
2.vsize:
Returns the number of bytes required for the expression
Select vsize ('HELLO') from dual
3.nvl (ex1,ex2):
Ex2 is returned if ex1 is empty, otherwise the value itself is ex1 (commonly used)
Example: if the employee has no commission, 0 will be displayed, otherwise the commission will be displayed.
Select comm,nvl (comm,0) from emp
4.nullif (ex1,ex2):
The value is equal to return empty, otherwise the first value is returned
Ex.: if the salary is equal to the commission, it will be empty, otherwise the salary will be displayed
Select nullif (sal,comm), sal,comm from emp
5.coalesce:
Returns the first non-empty expression in the list
Select comm,sal,coalesce (comm,sal,sal*10) from emp
6.nvl2 (ex1,ex2,ex3):
If ex1 is not empty, display ex2, otherwise display ex3
For example, check the names of employees with commission and their commission
Select nvl2 (comm,ename,') as HaveCommName,comm from emp
Original address; http://bbs.delit.cn/thread-198-1-1.html
Please indicate the source of the reprint
Written by: measurement Technology http://www.delit.cn
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.