database transplant
来源:互联网 发布:mac快压游讯 编辑:程序博客网 时间:2024/05/14 15:51
This week, I have a task to transplant the Oracle9i's infrastructure to MySQL in order to decrease our corp's cost. I haven't finished it so far, because I have met lots of problems.
MySQL's syntax is different from Oracle9i's. It really troubles me. Now I list some differences I have met.
1.datatype;
2.constraint;
3.index;
4.trigger;
5.sequence;
6.other;
Before that, I haven't really use mysql's command line to create a trigger and a index, but now, I learned to write some codes. It does work, I've make a big step, I know only that could I finish my task confidently. Below that I plan to examplify some cases which I will solve them later.
1.datatype:
CREATE TABLE "table_name"( "number" NUMBER(19, 0) NOT NULL, "varchar" VARCHAR2(255) NOT NULL, "timestamp" TIMESTAMP(6) NULL );
2.constraint:
ALTER TABLE "table_name" ADD CONSTRAINT "constraint_name" PRIMARY KEY ("column_name"); ALTER TABLE "table_name" ADD CONSTRAINT "constraint_name" CHECK ("column_name" IS NOT NULL);ALTER TABLE "table_name" ADD CONSTRAINT "constraint_name" FOREIGN KEY ("column_name") REFERENCES "table_name"("column_name");
3.index
CREATE INDEX "index_name" ON "table_name" ("column_name") ;
4.trigger:
CREATE OR REPLACE TRIGGER "trigger_name" AFTERINSERTOR UPDATE OF "column_name" ON "table_name" FOR EACH ROWBEGIN insert into "table_name"("column_name") values(sq_trade_audit.nextval, :new."column_name",);END;
5.sequence:
DROP SEQUENCE sequence_name;CREATE SEQUENCE sequence_name;
6.other:
PCTFREE 10PCTUSED 60INITRANS 10MAXTRANS 255CACHESTORAGE(INITIAL 51200k NEXT 25600K PCTINCREASE 0);
- database transplant
- QT transplant environment
- FCN中的transplant
- uCOS-III transplant to a Cortex MCU
- angular ngDialog background color to be transplant
- Android on the transplant ghostscript-9.04 static compiler
- DataBase
- Database
- database
- Database
- database
- Database
- database
- database
- database
- Database
- Database
- DATABASE
- 快走了
- 升级了最新的firefox3,但是好多扩展不能用了,词霸也不能取词了
- javascript正则表达式详解
- 今天拿到通知书了
- 我想呐喊
- database transplant
- 工作中的迷茫,该怎么面对?
- Nutch爬取网页ReadSegmen dump中文乱码问题
- 为什么有时类的析构函数要定义为protected呢?
- 直播卫星最有可能借奥运东风
- 迷茫的第一天
- 温暖的地铁
- jstl
- 计算IP报文校验和的小程序