Ver Mensaje Individual
  #3 (permalink)  
Antiguo 12/01/2007, 13:08
Avatar de Lord of freaks
Lord of freaks
 
Fecha de Ingreso: octubre-2004
Ubicación: Madrid
Mensajes: 334
Antigüedad: 20 años, 4 meses
Puntos: 2
Re: Seleccionar los ultimos 10 años

Si no entendí mal es esto lo que buscas ya me dirás, eso si funcionará siempre que tu campo anio esté en formato date o datetime

Código:
select * from tabla where year(anio) > year(now())-10 and dato1=x and dato2=y order by anio
Un saludo
__________________
Una vez un elemental de rayos mató una tribu entera de tritones.

¡¡ El sólo quería darse un baño !!

http://www.frikilandia.com

Neither Fu Nor Fa