Lesson 45 of 60
GoEmbedding a SQLite Database with `modernc.org/sqlite`
20 minutes
Course progress75%
SQLite in Go
This lesson explains the main concept clearly with beginner-friendly examples and background so you can learn why the code works.
modernc.org/sqlite is a pure‑Go SQLite driver.
$ go get modernc.org/sqlite
import (
"database/sql"
_ "modernc.org/sqlite"
)
{
db, _ := sql.Open(, )
db.Exec()
db.Exec(, )
name
db.QueryRow(, ).Scan(&name)
fmt.Println(name)
}