---
title: "系统从mysql移置到oracle的问题总结"
author: "ileson"
date: "2010-05-28T11:12:58Z"
tags: []
categories: ["数据库"]
slug: "mysql-oracle"
draft: false
lastmod: "2010-06-30T16:25:39Z"
id: 677663
url: "https://ileson.iteye.com/blog/677663"
---

1、oracle 关键字
   凡涉及到oracle关键字的，都要用“”双引号括起来。
   如果程序中用hibernate 管理与oracle 的连接
   配置文件：
   
```xml

   <property name="comment" column='"COMMENT"' type="string"></property>
   
```

   如果程序中有sql语句：
   
```java

     String sql=" select \"COMMENT\" from emp_info";
   
```

 2、自动增长
    
```sql

    create sequence HIBERNATE_SEQUENCE increment by 1 start with 1 nomaxvalue nocycle cache 10;--创建序列(hibernate 管理连接)
    
```

   
 3、sql语法的差异
    
```sql

      between to_date('2010-04-23','yyyy-mm-dd') and to_date('2010-04-24','yyyy-mm-dd')--查询某时间段要转换格式
       between to_date('2010-04-23','yyyy-mm-dd HH24:MI:SS') and to_date('2010-04-24','yyyy-mm-dd HH24:MI:SS')--
    
```