

The LIMIT clause accepts one or two arguments. The rowcount specifies the maximum number of rows to return. In fact, after selecting the col cells, it should walk over the table to count only. Is there a way to do this in one query EDIT: The output should be the col cells and the number of rows. SELECT COUNT () FROM col WHERE CLAUSE SELECT FROM col WHERE CLAUSE LIMIT X. You might want to use LIMIT in a function, therefore it is not a bad idea. The LIMIT clause is used in the SELECT statement to constrain the number of rows to return. The following illustrates the LIMIT clause syntax with two arguments: SELECT selectlist FROM tablename LIMIT offset, rowcount The offset specifies the offset of the first row to return. Currently, I use two separate queries to do so as. Thereofre, you should try to limit it 9999999999999, going higher can give you an error unless you set up server to go higher. So i just want to ask is there any way to retrieve all rows in mysql without calling a method which returns count(id) of x& without making an overload of existing function which does not have limit at all in query & withour string.Relace() functionality. The server uses these options to determine how large a table to permit.

See Section 13.1.20, CREATE TABLE Statement. In other words, no limit is applied if this option is specified. If you need a MyISAM table that is larger than the default limit and your operating system supports large files, the CREATE TABLE statement supports AVGROWLENGTH and MAXROWS options. You might receive an error if you set the limit to a very high number as defined by mysql doc. I want to retrieve all rows of a particular user with limit 0,x. If specified, the query returns all the rows.
