如何用一条sql查询不包含前5条记录的记录?
用最新时间排序,然后最新的前5条记录不要查询,查询第6条之后的记录用一条sql怎么实现?
------解决方案--------------------可考慮用存儲過程來實現: 
 DELIMITER $$   
 DROP PROCEDURE IF EXISTS `db`.`sp` $$ 
 CREATE PROCEDURE `sp`() 
 begin   
   prepare stmt from  'Select * from table limit 6,? ' ;   
   select count(*) into @inta  from table;   
   execute stmt using @inta;   
  end $$   
 DELIMITER ;
------解决方案--------------------首先判断纪录数是否大于5,如果小于等于,报纪录数不足.否则取倒序的前纪录数-5即可.这样可以吗?
------解决方案--------------------你要不用存储过程只能这样写了。 
 select count(*) from 你的表 into @cnt; 
 select * from 你的表 where 1 = 1 order by 时间字段 desc limit 6,@cnt; 
------解决方案--------------------select * from table where ID not in ( select * from (select ID from table order by time  limit 5)  as t) order by time   
 id是主键。
------解决方案--------------------select * from 你的表 where 1 order by 时间字段 desc limit 6,9999999