Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.
I created a table and inserted values into it but they are not storing in orderly manner.
The table looks like:
I can order them by using ORDER BY but it does not change them permanently. Is there a way to save them in orderly manner permanently.
Clarification: I don't want how they are stored internally, what I want is when ever I execute select * from cricket; the results to come sequentially. So that I don't want to use ORDER BY clause every time. Is there a way?
ALTER TABLE 'Cricket' ORDER BY 'sno';will allow you to do a
select * from cricketand get results returned ordered by sno 1,2,3,4,5,6 hope that helps as always, do a backup before making changes if you are new to working with DB.