answersLogoWhite

0

I'm actually not familiar with Access, but I'll try to help. Usually the primary key will physically order the rows in a database table. In SQL-query you can use "order by" clause. The default order is usually ascending. You can also add "asc" or "desc" after the column name.

Please do notice, primary keys are not for ordering rows. You should really let the database decide how to save the rows. You should always order the rows in your query (if needed), not modify or trust the physical order!

select col1

from foo

order by col2

select col1

from foo

order by col2 desc, col3 asc

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

How do you create a query that will display the top five orders in descending order by order total?

To create a query that will display the top five orders in descending order by order total create a select query object. Open the query design table and select the top five orders, then choose to display them in descending order.


What is the name of the field that is in either ascending or descending order and will be searched when a table-lookup is performed?

Index field.


How do you show the result in a sorted order while making query?

To display query results in a sorted order, you can use the ORDER BY clause in your SQL statement. For example, if you want to sort a table by a specific column, you would write SELECT * FROM table_name ORDER BY column_name ASC for ascending order or DESC for descending order. This ensures that the results are returned in the desired sequence based on the specified column.


What determines a table sort order in access?

In Microsoft Access, table sort order is determined by the settings applied to the fields in the table. You can specify the sort order (ascending or descending) in the query design view or in a datasheet view by clicking on the field header. Additionally, you can create custom sorting by using multiple fields, allowing for a prioritized sort based on your requirements. If no sort order is specified, records will be displayed in the order they were entered.


Routing table entries for major networks are stored in blank order whereas entries for subnets within each network are stored in blank order.?

ascending, descending


How do you sort variable in ascending or descending order both in php?

Assuming that the values are stored in an array, you can use the php function sort($array) to sort ascending, and rsort to sort descending. The following link gives a table that lists all of the built in PHP sort functions: http://php.net/manual/en/array.sorting.php


What does it mean to sort a table in ascending order?

To sort from smallest to largest. Ascending means to go up.


What determines a tables sort order?

A table's sort order is determined by the values of one or more columns used for sorting, typically specified in a query or during data retrieval. This can include ascending or descending order based on the data type, such as numerical, alphabetical, or date values. Additionally, sort order can be influenced by any specified sorting criteria or functions applied to the data. In databases, the default sort order may also depend on the underlying data structure or indexing.


What does it mean to sort a data file?

Sort refers to the action wherein the data fetched from a database table is ordered as per a specific criteria. The default order of sort is Ascending and the user can do a descending sort by using the keyword DESC after the order by keyword. Ex: select * from employee_details order by employee_num desc If the above statement is executed data will be displayed in descending order of employee numbers.


What clause should be used to display the rows of a table in ascending order of a particular column?

Order by


What does a sort mean in a database?

Sort refers to the action wherein the data fetched from a database table is ordered as per a specific criteria. The default order of sort is Ascending and the user can do a descending sort by using the keyword DESC after the order by keyword. Ex: select * from employee_details order by employee_num desc If the above statement is executed data will be displayed in descending order of employee numbers.


In GCSS- Army when an ascending or descending sort has been applied to a data table what indicator in the table is used to identify the column of data used to establish the sort?

Not sure