order()
Orders the result with the specified column
.
- JavaScript
- Python
const { data, error } = await supabase
.from('cities')
.select('name', 'country_id')
.order('id')
Parameters
columnrequiredobject
The column to order on.
__namedParametersrequiredobject
No description provided.
ascendingrequiredboolean
If
true
, the result will be in ascending order.foreignTablerequired|
The foreign table to use (if
column
is a foreign column).nullsFirstrequiredboolean
If
true
,null
s appear first.
Properties
Examples
select()
With - JavaScript
- Python
const { data, error } = await supabase
.from('cities')
.select('name', 'country_id')
.order('id')
With embedded resources
- JavaScript
- Python
const { data, error } = await supabase
.from('countries')
.select('name, cities(name)')
.eq('name', 'United States')
.order('cities.name')