answersLogoWhite

0


Best Answer

You can sort the results of a query by using the order by clause.

Ex: Select * from tbl_employee order by emp_num

The above query would sort the results by the employee number and display them. The default sort is ascending order.

Ex: Select * from tbl_employee order by emp_num desc

The above query would sort the results by descending order of employee number and display them.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How can you sort the results from an sql statement?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the use of the SQL sort?

The use of sorting information in SQL is to organize database query results. Typically the data can be sorted in either ascending or descending order. The "Order By" command can be used to sort data in SQL by multiple columns.


What are the differences between SQL statement to iSQL plus statement?

Structured Query Lanaguage(SQL) is a command language to communicate with oracle server.whereas SQL*PLUS is an oracle tool that recognises and submits sql statements to the oracle server for execution.


What is the error in this SQL statement?

You need to tell us what the statement is - in order for us to help you !


What is the abbreviation for statement?

Statement can be abbreviated to STMT. It is not widely used, but it appears SQL code.


What does a SQL Delete statement allow?

An SQL Delete statement is a code used for programming. It allows you to delete a single record or multiple records from a graph or table. These codes can be very useful.


What are the are two sort functions for columns in SQL?

Asc & desc


Which sql statement is used to update data from a database?

The SQL statement used to update data in a database is the UPDATE statement. It allows you to modify existing records in a table by specifying the columns and values to be updated based on certain conditions.


How do you do a select statement within a select statement in sql?

A memo is a useful tool to provide a record of communication.


Which SQL statement is used to extract data from a database?

"SELECT" statement is used to extract the infromation from a database.


Which SQL keyword is used to specify a condition that rows must meet to be included in the results of an SQL SELECT query?

select


Which SQL statement is used to update data in a database?

The SQL statement used to update data in a database is the "UPDATE" statement. It allows you to modify existing records in a table by specifying the column and value you want to update based on certain conditions. Additionally, you can use the "SET" keyword to assign new values to specific columns in the table.


When the number of records affected by the last DML statement?

Sql%count