I have an SQlite database with a few categories and each of them have some items inside. Right now the categories are arranged in alphabetical order but I want in the order I put them in the database. Any suggestions? I’m pretty new at this and can’t figure it out how to get rid of the alphabetical order.
Share
Lets take a look with simple example:
Table : Categories
cat_id cat_name someotherValuesNow, if you want it in alphabetical order, you can query like,
select * from categories order by cat_idIt’ll return you rows in 1,2,3,..,6 of
cat_idorder.P.S. There’s a default
row_idcolumn created with SQLite tables. You can set order onrow_idif you haven’t any unique field to set order. However order can by set on any field.