Using Cloudflare D1
· One min read
Cloudflare D1 is a great way to quickly create and work with SQLite databases where a larger PostgreSQL or MySQL don’t make sense. These are some examples to quickly work with D1.
Create the Database and Table
wrangler d1 create data-cloud-vendors
wrangler d1 execute data-cloud-vendors --command='CREATE TABLE Customers (CustomerID INT, CompanyName TEXT, ContactName TEXT, PRIMARY KEY (`CustomerID`));'