oracle中时间问题 - Oracle / 基础和管理
1.日期格式中的“J”和“jsp”表示什么意思?
select to_char(to_date(222,'J'),'jsp') from dual;
select to_char(to_date(222,'J'),'JSP') from dual;
select to_char(to_date(222,'J'),'Jsp') from dual;
2.计算08年奥运会(2008-08-08 20:00:00) 距离当前时间已过了多少天多少小时多少分多少秒? 求SQL!
SQL code:
SQL> --1、这个很有意思,可以将数字转换成英文
SQL> SELECT to_char(to_date(222, 'J'), 'jsp') from dual;
TO_CHAR(TO_DATE(222,'J'),'JSP'
---------------------------------------------------------------------------
two hundred twenty-two
SQL> SELECT to_char(to_date(222, 'J'), 'JSP') from dual;
TO_CHAR(TO_DATE(222,'J'),'JSP'
---------------------------------------------------------------------------
TWO HUNDRED TWENTY-TWO
SQL> SELECT to_char(to_date(222, 'J'), 'Jsp') from dual;
TO_CHAR(TO_DATE(222,'J'),'JSP'
---------------------------------------------------------------------------
Two Hundred Twenty-Two
SQL> --2、时间差
SQL> WITH tt AS
2 (SELECT SYSDATE - to_date('2008-08-08 20:00:00', 'yyyy-mm-dd hh24:mi:ss') dt from dual)
3 SELECT '奥运会距今已过:' || trunc(dt) || '天' || trunc((dt - trunc(dt)) * 24) || '小时' ||
4 trunc((dt * 24 - trunc(dt * 24)) * 60) || '分' || trunc((dt * 1440 - trunc(dt * 1440)) *
60) || '秒' diff
5 from tt;
DIFF
-----------------
相关问答:
在执行包的时候引用oracle spatial空间函数出错,出错情况如下
Errors in file
/user/oracle/app/oracle/admin/grid/udump/grid1_ora_143768.trc: ORA-29902:
error in executing ODCIIndexStart() routine ORA-0 ......
各位大哥,帮个忙。
下个Oracle for vista 版本的安装试试
10G和11G的
http://www.oracle.com/technology/software/products/database/index.html
------------------------------------------- ......
假设table01 中有 以下资料
emp_no emp_name
------- ------------
0001 TOM
0002 JOHN
0003 MARY
常用电话
而我们要得到以下的OUTPUT (或是各种其他的output)
0001,TOM
0002,JOHN
......
oracle 11g 安装 01092 错误,
日志信息:
[oracle@linux trace]$ vi alert_orcl.log
MMON started with pid=14, OS id=9089
RESETLOGS after incomplete recovery UNTIL CHANGE 522752
Errors in file / ......
服务器后台的数据库是oracle,在今天系统登录的时候报“登录不了数据库,IO异常”,结果是全公司都登不上去,我重启了一下服务器才好了,我想可能是用户并发量太大的缘故,不知道各位大虾认同不?有什么解决办法没? ......