データベース(oracle db2 mysql)にselect topの使い方

1.oracle
select * from tableName where rownum<=n

2.infomix
select first n * from tableName

3.db2
select * row_number() over(order by col1 desc) as rownum where rownum<=n

select column from table fetch first n rows only

4.sql server
select top n * from tableName

5.sybase
set rowcount n
go
select * from tableName

6.mysql
select * from tableName limit n

7.foxpro
select * top n from table order by column

MySQL

Posted by arkgame