数据库

Oracle,SQLserver,mySQL,postgreSQL,DB2区别

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;(limit 5 offset 10)
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;

4.默认最大连接数
MySql---100
Oracle---150
PostgreSql---100

 

你可能感兴趣的:(oracle,mysql,SQL Server,db2,PostgreSQL)