Menu
SupabaseGuidesDocs
Tools
  • GoTrue
  • GoTrue Client
  • Postgres
  • Postgres API
  • PostgREST
  • PostgREST Client
  • Realtime
  • Realtime Client
BlogLogin
Supabase
  • Guides
  • Docs
  • Blog
  • Tools
    • GoTrue
    • GoTrue Client
    • Postgres
    • Postgres API
    • PostgREST
    • PostgREST Client
    • Realtime
    • Realtime Client
  • Login
Supabase
  • About
    • Supabase Client
    • Installing
    • Initializing
    • Generating Types
  • Auth
    • auth.signUp()
    • auth.signIn()
    • auth.signOut()
    • auth.session()
    • auth.user()
    • auth.update()
    • auth.onAuthStateChange()
    • Reset Password (Email)
  • Data
    • Fetch data: select()
    • Create data: insert()
    • Modify data: update()
    • Delete data: delete()
    • Stored Procedures: rpc()
  • Realtime
    • on().subscribe()
    • removeSubscription()
    • getSubscriptions()
  • Modifiers
    • Using Modifiers
    • limit()
    • order()
    • range()
    • single()
  • Filters
    • Using Filters
    • .filter()
    • .or()
    • .not()
    • .match()
    • .eq()
    • .neq()
    • .gt()
    • .gte()
    • .lt()
    • .lte()
    • .like()
    • .ilike()
    • .is()
    • .in()
    • .cs()
    • .cd()
    • .sl()
    • .sr()
    • .nxl()
    • .nxr()
    • .adj()
    • .ov()
    • .fts()
    • .plfts()
    • .phfts()
    • .wfts()

single()

Retrieves only one row from the result. Result must be one row (e.g. using limit), otherwise this will result in an error.

  • JavaScript
  • Python
const { data, error } = await supabase
.from('cities')
.select('name, country_id')
.single()

Examples#

With select()#

  • JavaScript
  • Python
const { data, error } = await supabase
.from('cities')
.select('name, country_id')
.single()
Previous
« range()
Next
Using Filters »
  • Examples
    • With select()

Company

  • Blog
  • Open source
  • Humans.txt
  • Lawyers.txt

Resources

  • Docs
  • Pricing
  • Support

Community

  • GitHub
  • Twitter
  • DevTo

Alpha

  • Join our alpha
Copyright © 2020 Supabase.