Ascending order is the default for most (if not all) DBMS's so your statement is kind of weird in that respect but nevertheless, you can specify an order for each individual column by adding the specifier ASC
or DESC
to it.
Your statement then would become
SELECT title
, project_index
FROM projectdetail
WHERE project_index BETWEEN 1 AND 6
ORDER BY
title ASC
, project_index ASC
Edit
As been mentioned by @Arvo & @Dems, currently you are sorting first on title
and for identical titles on project_index
. If you want your project_index
sorted first, you have to place it first in the ORDER BY
clause.
Your statement then becomes
SELECT title
, project_index
FROM projectdetail
WHERE project_index BETWEEN 1 AND 6
ORDER BY
project_index ASC
, title ASC
and because ASC
is the default sort order, you can omit them alltogether
SELECT title
, project_index
FROM projectdetail
WHERE project_index BETWEEN 1 AND 6
ORDER BY
project_index
, title