2012年7月18日 星期三

找出的資料,加入流水號


//row > 9 and row < 200 指撈取 流水號 >9 和 <200的資料
select * from
(select @row := @row + 1 as row, t.*
from test_table as t, (select @row := 0) as r) as f
where row > 9 and row < 200;



SET @ROW = 0;
SELECT @ROW := @ROW +1 AS nums, num, create_date FROM test_table

沒有留言: