You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-parts/queries/03-Fetch_lang1.rst
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,8 +57,10 @@ The ``order_by`` argument can be a string specifying the attribute to sort by. B
57
57
58
58
The special attribute name ``"KEY"`` represents the primary key attributes in order that they appear in the index. Otherwise, this name can be used as any other argument.
59
59
60
-
If an attribute happens to be an SQL reserved word, it needs to be enclosed in backquotes. For example
61
-
...code: python
60
+
If an attribute happens to be a SQL reserved word, it needs to be enclosed in backquotes. For example:
61
+
62
+
.. code-block:: python
63
+
62
64
data = query.fetch(order_by='`select` desc')
63
65
64
66
The `order_by` value is eventually passed to the ``ORDER BY`` clause <https://dev.mysql.com/doc/refman/5.7/en/order-by-optimization.html>`_
0 commit comments