The following table contains keywords used in select statements and their descriptions:
Syntax Category | Keyword | Description |
Find Options | reverse | Returns records in reverse order. |
firstFast | Speeds up the fetch. This is a priority hint that means the first row appears quicker but the total return time may be slower. A typical use of this option is dialog updates. | |
firstOnly | Speeds up the fetch. This tells Microsoft Dynamics AX to fetch only the first record. | |
forUpdate | Selects records exclusively for update. The operation performed on the fetched records is update. Depending on the database, records may be locked for other users. | |
noFetch | Indicates that no records are fetched. This is used when the result of the select is passed to another application object; for example, a query that performs the fetch. | |
Aggregate | sum | Returns the sum of the fields from the rows given by the group by clause. Can be used to sum all accounts, order lines, and so on. |
avg | Returns the average of the fields from the rows given by the group by clause. | |
minof | Returns the minimum of the fields from the rows given by the group by clause. | |
maxof | Returns the maximum of the fields from the rows given by the group by clause. | |
count | Returns the number of fields from the rows given by the group by clause. | |
Sorting Options | order by | Instructs the database to sort selected records by fields in the order by list. |
group by | Instructs the database to group selected records by fields in the order by list. | |
Direction | asc | Sorts the order by or group by clause in ascending order. |
desc | Sorts the order by or group by clause in descending order. | |
Index Clause | index | Sorts the selected records as defined by the index. |
index hint | Gives the database a hint to use this index to sort the selected records as defined by the index. The database may ignore the hint. | |
Join Clause | exists | Returns a record only if the linked record exists. |
notexists | Returns a record only if the linked record does not exists. | |
outer | Returns all records regardless of whether linked records exist. |
Aucun commentaire:
Enregistrer un commentaire