Have the database sorted?

Hi,

I have a database with a table called leaderboard. Is there a command that will sort the table alphabetically by the "name" column and save it in the same order? When I search online, I only find the "SELECT * FROM …" command, but I don't want to display the table sorted; I want to save it sorted within the table. Can someone help me?

(1 votes)
Loading...

Similar Posts

Subscribe
Notify of
3 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
KarlRanseierIII
1 year ago

but I don’t want to see the table sorted, but I want to save it assorted in the table.

It is not the task of DB to store and organize the tuple internally in the way you want. That is precisely why this is done in the query, preferably supported by an index(tree).

CSANecromancer
1 year ago

Depending on the database (you do not say what it is) your concern does not make any sense. That’s why you don’t think about it.

With an MS SQL-DB, you might. work with a clustered index – but also the success with a leaderboard is not a real sense.

What do you promise about the sorted storage?

W00dp3ckr
1 year ago

Look at Index On. And then “order by”.