mardi 14 avril 2015

How to reorder coloumn in sql table?

When I delete some rows from a table it looks like the following table after removing:



-------------------------
ID | Name | Address |
-------------------------
1 | name1 | address1 |
-------------------------
2 | name2 | address2 |
-------------------------
8 | name8 | address8 |
-------------------------
9 | name9 | address9 |
-------------------------


The problem is the ID isnt ordered properly i need it to be reordered like this:



-------------------------
ID | Name | Address |
-------------------------
1 | name1 | address1 |
-------------------------
2 | name2 | address2 |
-------------------------
3 | name8 | address8 |
-------------------------
4 | name9 | address9 |
-------------------------


Is there a command to reorder the coloumn like shown? Im using sqlite


Aucun commentaire:

Enregistrer un commentaire