Home > Database > Mysql Tutorial > body text

Oracle 和 MySQL 主键、索引及分页的区别

WBOY
Release: 2016-06-07 17:23:58
Original
1063 people have browsed it

Oracle 和 MySQL 主键、索引及分页的区别: 1、主键,Oracle不可以实现自增,mysql可以实现自增。 oracle新建序列,SEQ_USER_Id.

Oracle 和 MySQL 主键、索引及分页的区别:

1、主键,,Oracle不可以实现自增,mysql可以实现自增。

oracle新建序列,SEQ_USER_Id.nextval

2、索引:

mysql索引从0开始,Oracle从1开始。

3、分页,

mysql: select * from user order by desc limit n ,m.

表示,从第n条数据开始查找,一共查找m条数据。

Oracle:select * from user

select rownum a * from ((select * from user)a)

select * from (select  rownum a.* from (select * from user) a )

where r between  n , m .

表示,n表示从第n条数据查询,查找到m条数据。

linux

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template