You are here: Using General SQL Parser > Select Statement > Order by clause
ContentsIndexHome
PreviousUpNext
Order by clause

Order by clause in select statement was represented by 2 properties: 

  1. SortClauseText, this is the string representation, you can fetch or set order by clause directly by using this property.
  2. SortClause, which is type of TLzOrderbyList, and represents detailed information about order by clause.
Items in TLzOrderbyList is type of TLzOrderBy which represents each field in order by list. 

there are 2 kinds of field that can be represents by TLzOrderBy, use SortItemType which is type of TLzSortItemType to determine type of field.

 

Check BuildSelect function in this demo to find out more information: 

http://www.sqlparser.com/dl/samples/buildsql.zip 

Gudu software http://www.sqlparser.com
Send comments about this topic.