Re: about limit
How about... SET @x=(SELECT COUNT(*) FROM ... WHERE ...) - 20; SET @sql=CONCAT("SELECT ... FROM ... WHERE ... LIMIT 20,", @x ); PREPARE stmt FROM @sql; EXECUTE stmt; DROP PREPARE stmt; PB - Dan Buettner wrote: Another solution might be something like: SELECT * FROM tablename WHERE id NOT IN (SELECT id FROM tablename WHERE some criteria ORDER BY something LIMIT 20) ORDER BY something Dan On 3/20/07, Rolando Edwards <[EMAIL PROTECTED]> wrote: SELECT ... FROM ... LIMIT 20,1; 100 million is a little exaggeration but you can other reasonably high numbers. Remember, LIMITs are zero-based not 1-based. - Original Message - From: "nikos" <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Sent: Tuesday, March 20, 2007 12:50:49 PM (GMT-0500) Auto-Detected Subject: about limit Hello list. Does any body knows how to select not the LIMIT 20 records but the rest of them? MySQL version is 4.1.21-standard and I cant make a VIEW. Thank you Nikos -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.15/728 - Release Date: 3/20/2007 8:07 AM
Re: about limit
Another solution might be something like: SELECT * FROM tablename WHERE id NOT IN (SELECT id FROM tablename WHERE some criteria ORDER BY something LIMIT 20) ORDER BY something Dan On 3/20/07, Rolando Edwards <[EMAIL PROTECTED]> wrote: SELECT ... FROM ... LIMIT 20,1; 100 million is a little exaggeration but you can other reasonably high numbers. Remember, LIMITs are zero-based not 1-based. - Original Message - From: "nikos" <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Sent: Tuesday, March 20, 2007 12:50:49 PM (GMT-0500) Auto-Detected Subject: about limit Hello list. Does any body knows how to select not the LIMIT 20 records but the rest of them? MySQL version is 4.1.21-standard and I cant make a VIEW. Thank you Nikos -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: about limit
Hmm! Clever! Thanx Rolando Edwards wrote: SELECT ... FROM ... LIMIT 20,1; 100 million is a little exaggeration but you can other reasonably high numbers. Remember, LIMITs are zero-based not 1-based. - Original Message - From: "nikos" <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Sent: Tuesday, March 20, 2007 12:50:49 PM (GMT-0500) Auto-Detected Subject: about limit Hello list. Does any body knows how to select not the LIMIT 20 records but the rest of them? MySQL version is 4.1.21-standard and I cant make a VIEW. Thank you Nikos -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: about limit
SELECT ... FROM ... LIMIT 20,1; 100 million is a little exaggeration but you can other reasonably high numbers. Remember, LIMITs are zero-based not 1-based. - Original Message - From: "nikos" <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Sent: Tuesday, March 20, 2007 12:50:49 PM (GMT-0500) Auto-Detected Subject: about limit Hello list. Does any body knows how to select not the LIMIT 20 records but the rest of them? MySQL version is 4.1.21-standard and I cant make a VIEW. Thank you Nikos -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: about limit
On 20 Mar 2007 at 12:50p -0400, nikos wrote: Does any body knows how to select not the LIMIT 20 records but the rest of them? MySQL version is 4.1.21-standard and I cant make a VIEW. In Venn-speak, you are asking for Circle A less(, minus, or subtract) Circle B. In SQL, this would translate to MINUS. However, last I checked, MySQL does not support (or has not yet implemented) the MINUS operator. This Google finding might prove useful to you in this endeavor (scroll to the last entry on the page): http://www.terminally-incoherent.com/blog/category/mysql/ Kevin -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
about limit
Hello list. Does any body knows how to select not the LIMIT 20 records but the rest of them? MySQL version is 4.1.21-standard and I cant make a VIEW. Thank you Nikos -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]