In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Use the general function NVL (aformab) to calculate the annual income of employees. NVL () acts on any type, that is, (number/varchar2/date).
General function: the parameter type can be number or varchar2 or date
Using the general function NVL2, if an is not NULL, take b value, otherwise take c value to calculate the annual income of employees.
If the type is the same, return NULL if an is the same as b, otherwise return a, and compare whether 10 and 10 are the same.
Using the case expression in the SQL99 standard general syntax, the position will be an analyst with a salary of + 1000, a position of a manager with a salary of + 800, and a position with a salary of + 400
Case field
When conditional then expression 1
When conditional then expression 2
Else expression n
End
Using the decode () function in the oracle-specific syntax, the position is for the analyst, the salary is + 1000; the position is the manager, the salary is + 800; the position is other, the salary is + 400
Decode (field, condition 1, expression 1, condition 2, expression 2... Expression n)
The single quotation marks appear as follows:
1) string, for example: 'hello'
2) date type, for example:'17-December-80'
3) to_char/to_date (date, 'YYYY-MM-DD HH24:MI:SS')
The double quotation marks appear as follows:
1) column aliases, for example: select ename "last name" from emp
2) to_char/to_date (date, 'YYYY "year" MM "month" DD "day" HH24:MI:SS')
(01) what are the two parts of the oracle server?
Database, instance
(02) what are the four major categories of SQL92/99 standards?
Data manipulation language, data definition language, data control language, transaction control language
(03) select *, ename from emp, is this correct?
No, because * can't be used with the number.
(04) what is the meaning of the NVL (a _ r _ b) function?
If the value of an is not NULL, the value is taken; otherwise, the value of b is taken.
(05) select sysdate from dual
View current system time
(06) what does select ename from emp where ename like'%\% 'escape'\ 'mean?
Escape'\ 'treats\ as an escape character
(07) if the null value is judged?
Is null / is not null
(08) can order by be sorted by column number? What date does it start?
Yes, starting with 1.
(09) between.. And.. And in.. What does it mean?
Between..and.. In between
In.. Between multiple valu
(10) what does select add_months (sysdate,-1) from dual mean?
The month is reduced by 1 month
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.