oracle10g_sqlplus(三)

2014-11-24 09:00:50 · 作者: · 浏览: 1
ary
WHEN job_id='ST_CLERK' THEN 1.15*salary
WHEN job_id='SELECT last_name, salary,
ELSE salary END "REVISED_SALARY"
FROM employees;
DECODE(col|expression, search1, result1
[, search2, result2,...,]
[, default])
SELECT last_name, job_id, salary,
DECODE(job_id, 'IT_PROG', 1.10*salary,
'ST_CLERK', 1.15*salary,
'SA_REP', 1.20*salary,
salary)
REVISED_SALARY
FROM employees;
12@@@@check the support language in your oracle database.
select * from v$nls_valid_values
6) date
1@@@@change the date format,so that you can see the accurate seconds.
SQL> select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') "sysdate" from dual;
sysdate
-------------------
2011-09-18 14:13:15
SQL> show parameter nls_date
NAME TYPE VALUE
nls_date_format string yyyy-mm-dd hh24:mi:ss
nls_date_language string
SQL> select sysdate from dual;
SYSDATE
------------------
18-SEP-11


作者 “redhat6_push_experience”