Re: [Postgresql-it] Finestra di valori

  • From: max jacob <max.jacob@xxxxxxxx>
  • To: postgresql-it@xxxxxxxxxxxxxxxxx
  • Date: Tue, 15 Feb 2005 20:59:50 +0100

ecco una soluzione solo sql:
   select campo_ricerca from table order by abs(V-campo_ricerca)  limit N;

se li vuoi in ordine:
select campo_ricerca from ( select campo_ricerca from table order by abs(V-campo_ricerca) limit N ) order by campo_ricerca;

m.



Other related posts: