answersLogoWhite

0

To show values in descending order, include the keyword DESC after the field name in the ORDER BY clause in the SQL. EX: SELECT FirstName, LastName, BirthDate FROM tblPerson ORDER BY BirthDate DESC, LastName, FirstName

User Avatar

Wiki User

17y ago

What else can I help you with?

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 does the SQL clause ORDER by CustomerLastName DESC do?

The SQL clause ORDER BY CustomerLastName DESC sorts the results of a query based on the values in the CustomerLastName column. The DESC keyword specifies that the sorting should be done in descending order, meaning that names will be listed from Z to A. This clause is typically used to organize data for easier reading or to prioritize records based on the specified column.


Which SQL keyword is used to retrieve only unique values?

DISTINCT


What is domain in SQL?

A set of possible data values is called Domain.


How do you retrieve data from an SQL database based on the values selected from combo box using jsp?

Try to repair sql database owing to utility below. Software is able to restore sql databases any version of MS SQL Server.


Where can SQL tools be found online?

SQL are Database Developers allowing one to produce database tables and values. Ideone is a program that also allows one to change the language as well as the values and program the data into the relevant fields.


How do you compile a PLSQL procedure?

You can do that with Sql*Plus: SQL> CREATE OR REPLACE PROCEDURE foo ... IS ... END foo; / SHOW ERRORS


Can composite key has null values?

if you want composite key for using the sql use the following sql query: select distinct(col_name) from table_name where col_name is null;


What is distinct in SQL language?

distinct keyword displays only unique values. eg.if there is a deprtment_id called 140 for thrice means it will diaplays only once. select distinct department_id from departments


List two reasons why null values might be introducedin database?

1. special requirements for its use in SQL joins. 2. special handling required by aggregate functions and SQL grouping operators


What is the function of a Foreign Key in SQL?

A Foreign Key in SQL is used to establish a relationship between two tables. It ensures referential integrity by enforcing that values in a column (or columns) in one table must match the values in a primary key in another table. This helps maintain consistency and data integrity across linked tables.


What is use of IN clause and between clause in sql?

It allows you to easily test if an expression is within a range of values (inclusive).