Difference between revisions of "Get the first 10 rows of the gisq.cia table."

From SQLZOO
Jump to: navigation, search
 
Line 10: Line 10:
 
<source lang='sql' class='def e-oracle'>SELECT * FROM bbc WHERE rownum<=10
 
<source lang='sql' class='def e-oracle'>SELECT * FROM bbc WHERE rownum<=10
 
</source>
 
</source>
<source lang='sql' class='def e-sqlserver'>SELECT TOP 10 * FROM bbc
+
<source lang='sql' class='def e-sqlserver e-mssql'>SELECT TOP 10 * FROM bbc
 
</source>
 
</source>
 
<source lang='sql' class='def e-mimer'>Unknown - please email if you know
 
<source lang='sql' class='def e-mimer'>Unknown - please email if you know

Latest revision as of 17:16, 1 July 2017

Get the first 10 rows of the bbc table.

schema:gisq
SELECT * FROM bbc FETCH FIRST 10 ROWS ONLY
SELECT TOP 10 * FROM bbc
SELECT * FROM bbc WHERE rownum<=10
SELECT TOP 10 * FROM bbc
Unknown - please email if you know
set rowcount 10;
select * from bbc;
set rowcount 0
SELECT * FROM bbc LIMIT 10