I want to run a basic query, but return only the first ten rows of the table from Netezza
select a.*
from some_schema.some_table a
where rownum < 10
What is the Netezza way of looking at just those few rows?
The SQL LIMIT clause restricts how many rows are returned from a query. The syntax for the LIMIT clause is: SELECT * FROM table LIMIT X;. X represents how many records you want to retrieve. For example, you can use the LIMIT clause to retrieve the top five players on a leaderboard.
You can easily change this limit by going to MySQL Workbench >> Edit >> Preferences >> SQL Queries tab. Over here you will option to Limit Rows. You can set this to very high value or uncheck the option.
The limit keyword is used to limit the number of rows returned in a query result.
Ah! Just found it.
For Netezza this query is
select a.*
from some_schema.some_table a
limit 10
-mcpeterson
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With