Oracle中的一些时间处理
<!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
mso-pagination:none;
font-size:10.5pt;
mso-bidi-font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:宋体;
mso-font-kerning:1.0pt;}
/* Page Definitions */
@page
{mso-page-border-surround-header:no;
mso-page-border-surround-footer:no;}
@page Section1
{size:595.3pt 841.9pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:42.55pt;
mso-footer-margin:49.6pt;
mso-paper-source:0;
layout-grid:15.6pt;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:1401251922;
mso-list-type:hybrid;
mso-list-template-ids:850396746 -692523360 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-tab-stop:18.0pt;
mso-level-number-position:left;
margin-left:18.0pt;
text-indent:-18.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
-->
Oracle
中的时间处理
1.
当前时间:
select sysdate from dual
。
2.
当期时间减去一天后的时间:
select sysdate from dual
。
3.
当期时间减去一小时后的时间:
select sysdate - 0.041666687 from dual
。
4.
得到当前年份:
select to_char(sysdate, ‘YYYY’) from dual;
5.  
相关文档:
我在oracle 9i的环境下开发了occi的应用,结果放到10g(10.2.0.3)服务器上运行不了(只装了windows 版的10g服务端),只好把所有依赖的9i的dll拷过去,结果连接occi报错:
Error while trying to retrieve text for error ORA-32101
到http://www.oracle.com/technology/global/cn/software/tech/oci/instantclient/index.ht ......
SQL Server里的 ISNULL 与 Oracle 中的 NULLIF不同:
SQL Server 中有两个参数,语法:
ISNULL(check_expression, replacement_value)
check_expression 与 replacement_value 数据类型必须一致
如果 check_expression 为 NULL,则返回 replacement_v ......
Oracle 用户及角色 介绍 收藏
一. 用户管理
1.1 建立用户(数据库验证)
CREATE USER DAVE IDENTIFIED BY pwd
DEFAULT TABLESPACE users
TEMPORARY TABLESPACE temp ......
数据库查询中难免会遇到行列转换的情况,摘列一些较精典的解决方案
--####################################################################
一、采用SQL decode和PL/SQL函数实现
--####################################################################
1、固定列数的行列转换
如
student subject grade
------ ......