Oracle默认密码以及修改密码-->
默认密码:
用户名:sys 密码:change_on_install
用户名:system 密码:manage
用户名:internal 密码:oracle
用户名:scott 密码:tiger
修改密码:
C:\Documents and Settings\Administrator>sqlplus system/oracle as sysdba
SQL> select username,password from dba_users;
SQL> alter user system identified by manager;
SQL> alter user SCOTT identified by tiger;
C:\Documents and Settings\Administrator>sqlplus scott/tiger
标量子查询
select e.salary,(select g.grade from salgrade g where e.salary between g.losal and g.hisal) from s_emp e
to_char的使用:
select to_char(salary,'$9999.99')
from s_emp
select to_char(salary,'$0000.00')
from s_emp
TO_CHAR(MR.BED_CARE_CHARGE,'L9999999.99') BED_CARE_CHARGE ,
TO_CHAR(MR.OTHER_CHARGE,'L9999999.99') OTHER_CHARGE ,
TO_CHAR(MR.BIRTH_DATE,'YYYY"年"MM"月"DD"日"') BIRTH_DATE ,
页面中使用JSTL对日期的处理:
<fmt:formatDate value="${user.birthday}" pattern="yyyy年MM月dd日">
使用foreach标签:
=======foreach循环迭代=======<br/>
<c:forEach items="${requestScope.users}" var="user" varStatus="state">
<tr>
<td>${state.index}</td>
<td>${user.username}</td>
<td>${user.age}</td>
<td>
<fmt:formatDate value="${user.birthday}" pattern="yyyy年MM月dd日">
</td>
</tr>
</c:forEach>
用Sybase Central连接ASE数据库乱码问题的解决:
用sybase自带的客户端工具sybase central连接ase 的时候,如果连接字符集设置不合适,查询结果中汉字会出现乱码。在sybase central连接配置窗口中,将Character set调整为:cp936。必须设置Character set这个参数,否则sybase central中显示的汉字肯定是乱码,这和sybase central使用的jdbc驱动有关。