六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 63|回复: 0

数据库

[复制链接]

升级  72%

6

主题

6

主题

6

主题

童生

Rank: 1

积分
36
 楼主| 发表于 2013-1-25 21:31:26 | 显示全部楼层 |阅读模式
oracle,sqlserver,mysql,postgresql区别
1.端口
Oracle----1521
SqlServer---1433
MySQL-----3306
postgreSQL-----5432
DB2-----50000
2.自动生成主键
   Oracle----sequence---select seq.nextval from dual;select seq.currval from dual;
   SqlServer---identity(1,1)--studentId int primary key identity(1,1),
   MySQL-----auto_increment ----studentId int primary key auto_increment,
postgreSQL-----sequence--------select currval('seq');select nextval('seq')
3.分页查询11-15
  Oracle----select * from (select rownum rm,e.* from emp e) where rownum<=5 and rm>=11
  SqlServer---select top 5 * from student where sno not in (select top 10 sno from student);
  MySQL---select * from student limit 10,5;
postgreSQL---select * from student limit 5 offset 10
DB2----select * from  (select a.* ,rownumber() over() as rowid from emp a) as p where p.rowid > 10 AND    p.rowid < 16
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表