安装区别
win7下安装程序需要调兼容性
右键管理员身份运行安装程序
注意:
MySQL是直接提供用户,然后用户可以执行建库,建表等操作
Oracle需要先行建库,库提供用户
Oracle提供了2个重要用户
管理员 : sys 密码 : 初始密码 as sysdba
普通用户 : scott(锁定状态) 密码 : tiger
在Oracle中,数据库对象是属于用户的
登录 sys 解锁scott alter user scott account unlock
切换用户conn scott/tiger;
提示the password has expired密码过期
采用IDE去访问数据
plSqldeveloper : 解压路径中不能存在括号
navicat for oracle
mysql中autocommit默认是true,oralce中autocommit默认是false
DQL,DML,DCL,DDL,TPL
DQL数据查询语言 : SELECT
DML数据操作语言: insert ,update, delete
DCL数据控制语言 : grant ,revoke
DDL数据定义语言 : create ,alter ,drop
TPL 事务控制语言: commit,rollback
建表差异
-- MySQL 5.6以上版本
-- 主键自增长
create table userinfo(
`id` bigint auto_increment comment '主键',
`username` varchar(50) not null default '' comment '用户名',
`password` varchar(20) not null default '' comment '密码',
`birthday` date not null default '' comment '生日',
`regtime` datetime not null default now() comment '注册时间',
`height` decimal(3,2) not null default 0 comment '身高',
`sign` longtext,
primary key(`id`)
)
-- 插入记录,不需要管主键,因为自增长