Before you begin
Before reading this page, do the following:- Create a CockroachDB Standard cluster or start a local cluster.
- Install a Driver or ORM Framework.
- Connect to the database.
- Insert data that you now want to run queries against.
When running under the default
SERIALIZABLE isolation level, your application should use a retry loop to handle transaction retry errors that can occur under contention.Simple selects
cockroach sql reference docs.
- Build a Python App with CockroachDB (psycopg3)
- Build a Python App with CockroachDB and SQLAlchemy
- Build a Python App with CockroachDB and Django
- Build a Python App with CockroachDB and asyncpg
Order results
To order the results of a query, use anORDER BY clause.
For example:
ORDER BY syntax page.
Limit results
To limit the results of a query, use aLIMIT clause.
For example:
LIMIT/OFFSET syntax page.

