Tema: Sintaxis sql
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/12/2007, 00:44
Avatar de emiliodeg
emiliodeg
 
Fecha de Ingreso: septiembre-2005
Ubicación: Córdoba
Mensajes: 1.830
Antigüedad: 18 años, 8 meses
Puntos: 55
Re: Sintaxis sql

bueno hay muchas de formas de conseguir esto, esta es la q se me ocurre mas rapidamente

select t.id,t.nombre,t.apellido,t.email from tabla t
where t.id=(select max(t2.id) from tabla t2)
or t.id=(select min(t2.id) from tabla t2)
__________________
Degiovanni Emilio
developtus.com