Bug #20623 ORDER BY ... COLLATE ... is not mentiond in doku

Submitted: 22 Jun 2006 10:31 Modified: 22 Jun 2006 11:50
Reporter: Oli Sennhauser Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version: OS:
Assigned to: CPU Architecture:Any

[22 Jun 2006 10:31] Oli Sennhauser
Description:
ORDER BY data COLLATE latin1_german2_ci

is correctly accepted by mysql but not documented where I expect it...

How to repeat:
This statement is correctly accepted by mysql but not documented where I expect it:

SELECT *
  FROM collation_test
 ORDER BY data COLLATE latin1_german2_ci; 

http://dev.mysql.com/doc/refman/5.0/en/select.html

Suggested fix:
Eigther it is a docu "bug" or a mysql bug.
[22 Jun 2006 11:50] Valeriy Kravchuk
Thank you for a problewm report. http://dev.mysql.com/doc/refman/5.0/en/charset-collate.html has the example you wanted:

" With the COLLATE clause, you can override whatever the default collation is for a comparison. COLLATE may be used in various parts of SQL statements. Here are some examples:

    - With ORDER BY:

SELECT k
FROM t1
ORDER BY k COLLATE latin1_german2_ci;"

On the page you quoted we have:

"[ORDER BY {col_name | expr | position}
      [ASC | DESC], ...]"

So, you should expect expression in ORDER BY. I do not think that anything more should be added to the documentation.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.047 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.