• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
arfan

arfan

summer-notes-v1

Unlisted
Like
summer-notes-v1
Home
Code
13
.cursor
1
.vscode
1
_md_Files
4
backend
3
frontend
3
shared
3
tmp
1
.gitignore
.repoignore
.vtignore
README.md
REFACTOR_SUMMARY.md
deno.json
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
_md_Files
/
sqlite-commands.md
Code
/
_md_Files
/
sqlite-commands.md
Search
5/23/2025
Viewing readonly version of main branch: v130
View latest version
sqlite-commands.md

Common SQLite Commands

my most used commands

SELECT * FROM summer_notes_v1; # select all columns & rows PRAGMA table_info(summer_notes_v1); # list all columns SELECT * FROM summer_notes_v1 WHERE archived = 1; # select all rows where archived is 1

Basic Commands

Select Data

Retrieve all columns from a table:

SELECT * FROM table_name;

Retrieve specific columns from a table:

SELECT column1, column2 FROM table_name;

Insert Data

Insert a new record into a table:

INSERT INTO table_name (column1, column2) VALUES (value1, value2);

Update Data

Update existing records in a table:

UPDATE table_name SET column1 = value1 WHERE condition;

Delete Data

Delete records from a table:

DELETE FROM table_name WHERE condition;

Table Management

Create Table

Create a new table:

CREATE TABLE table_name ( column1 datatype, column2 datatype, ... );

Drop Table

Delete a table and its data:

DROP TABLE table_name;

Alter Table

Add a new column to an existing table:

ALTER TABLE table_name ADD column_name datatype;

Schema Information

List All Tables

Show all tables in the database:

.tables

List All Columns

Get a list of all columns in a specific table:

PRAGMA table_info(table_name);

Query Modifiers

Where Clause

Filter records based on conditions:

SELECT * FROM table_name WHERE condition;

Order By

Sort the result set:

SELECT * FROM table_name ORDER BY column1 ASC|DESC;

Limit

Limit the number of records returned:

SELECT * FROM table_name LIMIT number;

Group By

Group rows with the same values:

SELECT column1, COUNT(*) FROM table_name GROUP BY column1;

Joins

Combine rows from two or more tables:

SELECT columns FROM table1 JOIN table2 ON table1.common_column = table2.common_column;
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.