Re: Row Number

2003-06-03 Thread Román Sánchez
 If i have a table with just Userid,Name,Language
 where userid is primary key.
 now if i search the first 10 people that speaks english i.e
 SELECT * FROM tablex WHERE language='English' LIMIT 10;

 Can't i get the row number of the last matched record?
 So i can do
 SELECT...LIMIT nex-ten-starting,10

I f I understand correctly, LIMIT works *on the resul set*.Thus, all you
have to do is

SELECT * FROM tablex WHERE language='English' LIMIT 10, 10;

This should get speaking-english persons starting from the 11th one.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Auto decrement

2003-05-27 Thread Román Sánchez
 Does anyone know if there is a way of setting an auto numbered field
 that starts at say 2,000,000 and decreases by one on each insert?

Well, if you know the starting number you can use a normal autoinc field and
retrieve the value you want by substracting:

2,000,000 - AutoIncField

Regards


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]