![]()
![]() ![]() ![]() ![]() ![]() ![]() ![]() Documentation Top ![]() Global Index ![]() Reference Manual ![]() ![]() ![]() Developer's Guide ![]() ![]() Tuning Cloudscape ![]() ![]() |
ORDER BY clauseThe ORDER BY clause is an optional element of a SELECT statement. An ORDER BY clause allows you to specify the order in which rows appear in the ResultSet. Syntax
ColumnPosition is an integer that refers to the number of the column in the SelectItem in the underlying Query of the SELECT statement (numbering starts at 1). (In other words, if you want to order by a column, that column must be in the select list.) ColumnName refers to the names visible from the SelectItems in the underlying query of the SELECT statement. (In other words, if you want to order by a column, that column must be in the select list.) ASC specifies that the results should be returned in ascending order; DESC specifies that the results should be returned in descending order. If the order is not specified, ASC is the default. An ORDER BY clause prevents a SELECT statement from being an updatable cursor. (For more information, see Requirements for Updatable Cursors.) For ORDER BY, NULLs sort low. For example, if an INTEGER column contains integers, NULL is considered less than 1 for purposes of sorting. You cannot ORDER BY a Java data type unless the data type is orderable (see Orderable Java Data Types). NEW: The ability to order by some Java data types is new in Version 3.0. Example | ||
![]() ![]() ![]() ![]() ![]() ![]() | ![]() ![]() Cloudscape Version 3.0 ![]() For technical support, go to: www.cloudscape.com and click Support. Copyright © 1998 and 1999 Cloudscape, Inc. All rights reserved. |