Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove the limit clause from MySQL Workbench

Tags:

mysql

limit

I'm running this query: select * from schema.table

but i'm only getting the first 1000 rows

i see in the output window that there was a LIMIT clause appended to my select statement. Is there a way to turn off the default limit?

like image 223
Ramy Avatar asked Mar 03 '11 19:03

Ramy


People also ask

How do I remove a LIMIT in SQL query?

On the menu bar visit Edit -> Preferences . Jump to the SQL Queries tab. In the Query Results section at the bottom untick the Limit Rows option. You can adjust the limit to a higher value from this location as well, if that is preferable.

How do I change the LIMIT of a workbench in MySQL?

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. When you uncheck that option, it will retrieve all the rows from a query (equivalent to no limits).

Is there a LIMIT clause in MySQL?

The MySQL LIMIT ClauseThe LIMIT clause is used to specify the number of records to return. The LIMIT clause is useful on large tables with thousands of records. Returning a large number of records can impact performance.

What can I use instead of LIMIT in MySQL?

To get only the specified rows from the table, MySQL uses the LIMIT clause, whereas SQL uses the TOP clause, and Oracle uses the ROWNUM clause with the SELECT statement.


Video Answer


1 Answers

You can toggle the LIMIT clause added by MySQL Workbench via the SQL Editor tab within the application preferences (Edit menu -> Preferences...).

Simply un-check the "Limit Rows" option within the Query Results section as pictured below.

MySQL Workbench Preferences

EDIT:

In Workbench 6.0, the "Limit Rows" checkbox stands in "SQL Queries" tab (new tab of the same form).

like image 190
John Parker Avatar answered Sep 23 '22 08:09

John Parker