반응형

DB에서 쿼리 상위 10개 가져오기...


 
For example, in Microsoft SQL Server you would use TOP:
SELECT TOP 10 column FROM table


MySQL and PostgreSQL SQL would use LIMIT like so:
SELECT column FROM table LIMIT 10


PostgreSQL v8.3 and later can also use this more standard SQL:
SELECT column FROM table FETCH FIRST 10 ROWS ONLY

 

An Oracle programmer would write
SELECT column FROM table WHERE ROWNUM <= 10


In Sybase, you would set rowcount
SET rowcount 10
SELECT column FROM table
 
 

반응형
Posted by 공간사랑
,