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

From SQLZOO
Jump to: navigation, search
(Created page with "Get the first 10 rows of the gisq.cia table. <div class='ht'> <source lang=sql class='tidy'> <source lang='sql' class='def e-db2'>SELECT * FROM cia FETCH FIRST 10 ROWS ONLY </...")
 
 
(4 intermediate revisions by one user not shown)
Line 1: Line 1:
Get the first 10 rows of the gisq.cia table.
+
Get the first 10 rows of the bbc table.
 
<div class='ht'>
 
<div class='ht'>
<source lang=sql class='tidy'>
+
<div class=params>schema:gisq</div>
<source lang='sql' class='def e-db2'>SELECT * FROM cia FETCH FIRST 10 ROWS ONLY
+
<source lang=sql class='tidy'></source>
 +
<source lang=sql class='setup'></source>
 +
<source lang='sql' class='def e-db2'>SELECT * FROM bbc FETCH FIRST 10 ROWS ONLY
 
</source>
 
</source>
<source lang='sql' class='def e-access'>SELECT TOP 10 * FROM cia
+
<source lang='sql' class='def e-access'>SELECT TOP 10 * FROM bbc
 
</source>
 
</source>
<source lang='sql' class='def e-oracle'>SELECT * FROM cia 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 cia
+
<source lang='sql' class='def e-sqlserver'>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
 
</source>
 
</source>
 
<source lang='sql' class='def e-sybase'>set rowcount 10;
 
<source lang='sql' class='def e-sybase'>set rowcount 10;
select * from cia;
+
select * from bbc;
 
set rowcount 0
 
set rowcount 0
 
</source>
 
</source>
<source lang='sql' class='def'>SELECT * FROM cia LIMIT 10
+
<source lang='sql' class='def'>SELECT * FROM bbc LIMIT 10
 
</source>
 
</source>
 
<div class="ecomm e-db2" style="display: none">Thanks to ericlentz for this</div>
 
<div class="ecomm e-db2" style="display: none">Thanks to ericlentz for this</div>

Latest revision as of 15:43, 12 July 2012

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
Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense