aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_record_querying.md
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-03-07 12:10:36 +0900
committerRyuta Kamizono <kamipo@gmail.com>2019-03-07 12:10:36 +0900
commit4ad4de50ce164f7b62661408eceb4259dfccdf66 (patch)
tree82c3fe39c968a8c4fcb7c2f6afc9691cb164ec73 /guides/source/active_record_querying.md
parentcece9ea0cde831f83b46e7c1181125cd3f400f67 (diff)
downloadrails-4ad4de50ce164f7b62661408eceb4259dfccdf66.tar.gz
rails-4ad4de50ce164f7b62661408eceb4259dfccdf66.tar.bz2
rails-4ad4de50ce164f7b62661408eceb4259dfccdf66.zip
Correct the limitation about `order` with `distinct` in the guide
That is happened with `distinct`, and that is not only happened on MyS L, but also on PostgreSQL, SQL Server, and Oracle. [ci skip]
Diffstat (limited to 'guides/source/active_record_querying.md')
-rw-r--r--guides/source/active_record_querying.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md
index 30493038e7..c9db99ca1d 100644
--- a/guides/source/active_record_querying.md
+++ b/guides/source/active_record_querying.md
@@ -611,7 +611,8 @@ If you want to call `order` multiple times, subsequent orders will be appended t
Client.order("orders_count ASC").order("created_at DESC")
# SELECT * FROM clients ORDER BY orders_count ASC, created_at DESC
```
-WARNING: If you are using **MySQL 5.7.5** and above, then on selecting fields from a result set using methods like `select`, `pluck` and `ids`; the `order` method will raise an `ActiveRecord::StatementInvalid` exception unless the field(s) used in `order` clause are included in the select list. See the next section for selecting fields from the result set.
+
+WARNING: In most database systems, on selecting fields with `distinct` from a result set using methods like `select`, `pluck` and `ids`; the `order` method will raise an `ActiveRecord::StatementInvalid` exception unless the field(s) used in `order` clause are included in the select list. See the next section for selecting fields from the result set.
Selecting Specific Fields
-------------------------