Sql Database Query ascending order

Asked By 0 points N/A Posted on -
qa-featured

Hi. I have a problem on the query that I want to happen. I want the dataset to be order in a ascending order alphabetically. I have a lot of data that I wanted to be arrange alphabetically. Really need help. Thanks in advance

SHARE
Answered By 0 points N/A #161481

Sql Database Query ascending order

qa-featured

The fact that you mentioned datasets tells me you are using ADO.NET with the .Net framework for programming the database.

For results in ascending order from the database to the dataset, you just write a standard Select query and execute it against the database.You then fill your dataset using a sql data adapter.You would use the code snippet like below.I write the select statement:

SELECT * FROM yourtable WHERE yourfield=condition ORDER BY yourfield ASC

Note the ASC keyword at the end.This is what gives you a sorted result set in ascending order.

Let me know if you need more help.

Login/Register to Answer

Related Questions