Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/03/2011, 01:42
riwel
 
Fecha de Ingreso: septiembre-2008
Mensajes: 29
Antigüedad: 15 años, 7 meses
Puntos: 0
Sacar de una tabla los tres últimos registros

Hola a todos:

Necesitaría sacar de una tabla los tres últimos registros, imaginemos que tengo la siguiente tabla

+----+---------+--------------+
| id | user_id | user_name|
+----+---------+--------------+
| 1 | 1 support_pool |
| 2 | 2 | **** |
| 3 | 5 | ******** |
| 4 | 6 | ******* |
| 5 | 7 | ******* |
+----+---------+--------------+

y quiero que me salga :

id user_id user_name
| 3 | 5 | ******** |
| 4 | 6 | ******* |
| 5 | 7 | ******* |

he probado con:

select * from table ORDER BY 'id' DESC LIMIT 0 , 3;

pero no me hace caso..., alguna idea??