Compile SQL to type-safe code;
catch failures before they happen.
Get started
How it works
sqlc generates fully type-safe idiomatic code from SQL.
- You write SQL queries
- You run sqlc to generate code that presents type-safe interfaces to those queries
- You write application code calling the methods sqlc generated.
Seriously, it's that easy. You don't have to write any boilerplate SQL querying code ever again. See the current list of supported programming languages and databases .
Ready to try it out?
Download the latest release now.
Linux
macOS (AMD64)
macOS (ARM64)
Windows
Used by these lovely companies
From the blog
release notes
August 5, 2024
sqlc is a command line tool that generates type-safe code from SQL. Today we released sqlc v1.27.0 with support for local managed databases.
release notes
March 28, 2024
sqlc is a command line tool that generates type-safe code from SQL. Today we released sqlc v1.26.0 , mainly a bug fix release.
release notes
January 4, 2024
sqlc is a command line tool that generates type-safe code from SQL. Today we released sqlc v1.25.0 , a smaller release that removes our reliance on cgo.