Freitag, 22. Mai 2015

Mysql order by field

FIELD () is a function that returns the index position of a comma-delimited list if the value you are searching for exists. Order by a different field on a. Weitere Ergebnisse von dba. MySQL - Can we order by column position. The custom sort order with the FIELD function will be covered. There may be times when a specific order is required in a SQL . However, there are times when you want to sort the in a specific order which cannot be done using the ASC or DSC.


This means that the order is undefined for columns that are identical except for . The FIELD () function returns the index position of a value in a list of values. This function performs a case-insensitive search. To sort the records in descending order , use the DESC keyword. Customers table, sorted by the Country column :. It is used to sort the result-set in . SELECT returns records in no particular order.


You can sort the returned result on any field , if that field is being listed out. ORDER BY allows sorting by one or more columns.

Keine Kommentare:

Kommentar veröffentlichen

Hinweis: Nur ein Mitglied dieses Blogs kann Kommentare posten.

Beliebte Posts