Order token

This token is sent by the server as part of a result set to indicate in which order the rows are. This is returned whenever an ORDER BY is used in a SQL statement.


Properties

byte tokenType: the type code for this token (0xA9).

String tokenTypeName: the name corresponding to this token's type ("Order").

int[] colNums: the index (1-based) of the columns. Note that this does not indicate whether the order is ascending or descending.


Example

If a table exists of the form:

create table Example (

id int,

first_name varchar(50),

middle_name varchar(50),

last_name varchar(50),

dob date,

primary key (id)

)

then if the following SQL query is run:

select * from Example order by last_name, first_name, dob desc

the result set will include an Order token with the values [4, 2, 5].