MySQL Forums
Forum List  »  Spanish

numeros
Posted by: David Rocamora
Date: March 12, 2009 12:24PM

Buenas tardes,

me gustaria saber si existe alguna funcion en mysql que me pueda proporcionar lo siguiente:

yo tengo una tabla (nombre, id_nombre). en id_nombre lo quiero incrementar yo, desde 1,2,3,4...

mientras no se borre ningun numero pues se puede averiguar cual es el siguiente numero mediante la funcion select max().
el problema viene cuando se borra algun numero. Si por ejemplo tenemos 9 registros

1-2-3-4-5-6-7-8-9 y borramos el 4.

me gustaria meter el siguiente nombre en la posicion 4, pero con la funcion select max() no lo puedo sacar, alguien podria echarme una mano???

muchas gracias.

un saludo.

Options: ReplyQuote


Subject
Views
Written By
Posted
numeros
2814
March 12, 2009 12:24PM
1862
March 13, 2009 02:29AM
2454
March 13, 2009 07:39AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.