Skip to content
Home
Dev Convert Generate Finance Calc Design Security Media

More categories

Productivity 23 SEO Tools 18 Network Tools 17 Text Tools 16 Education Tools 15 PDF Tools 11 Mockups 9

Learn and build

GuidesBlogAPI & MCPCheatsheetsChangelog All categories

Browse

439 tools · 15 categories

Start here

Popular tools New this week 11 All tools 439

Categories

Developer Tools 91 Converters 65 Calculators 32 Finance Tools 32 Generators 31 Media Tools 27 Design Tools 25 Security Tools 25 Productivity 23 SEO Tools 18 Network Tools 17 Text Tools 16 Education Tools 15 PDF Tools 11 Mockups 9

Learn and build

Guides Cheatsheets Blog REST API MCP server Changelog

No matches here.

Keep FindUtils free Sponsors fund new tools
  1. Cheatsheets
Guides Blog API & MCP
Sponsor
FindUtils
Sponsor
  1. Home
  2. Cheatsheets
  3. Programming
  4. SQL Reference

Programming · Cheatsheet

SQL Reference Cheatsheet

Common SQL clauses for queries, joins, aggregation, data changes, tables, and indexes. Check the database dialect.

43 commands 7 sections

On this sheet

Querying Data 7 Filtering & Sorting 10 Joins 6 Aggregation 6 Data Modification 5 Table Operations 6 Sources 3
Try it in the browser Turn a CSV into CREATE TABLE and INSERT statements for Postgres, MySQL, or SQLite. Open CSV to SQL

No entry matches that filter.

Querying Data

  • SELECT * FROM table Select all columns from table
  • SELECT col1, col2 FROM table Select specific columns
  • SELECT DISTINCT col FROM table Select unique values only
  • SELECT col AS alias FROM table Column alias
  • SELECT COUNT(*) FROM table Count total rows
  • SELECT * FROM table LIMIT 10 Limit results to 10 rows
  • SELECT * FROM table LIMIT 10 OFFSET 20 Pagination (skip 20, take 10)

Filtering & Sorting

  • WHERE col = value Filter by exact match
  • WHERE col != value / WHERE col <> value Not equal
  • WHERE col > 10 AND col < 100 Range with AND
  • WHERE col IN (1, 2, 3) Match any value in list
  • WHERE col NOT IN (1, 2, 3) Exclude values in list
  • WHERE col BETWEEN 10 AND 100 Range inclusive
  • WHERE col LIKE "%pattern%" Pattern match (% = any chars)
  • WHERE col IS NULL / IS NOT NULL Check for NULL values
  • ORDER BY col ASC|DESC Sort results
  • ORDER BY col1 ASC, col2 DESC Multi-column sort

Joins

  • INNER JOIN t2 ON t1.id = t2.fk Only matching rows from both tables
  • LEFT JOIN t2 ON t1.id = t2.fk All from left + matching from right
  • RIGHT JOIN t2 ON t1.id = t2.fk All from right + matching from left
  • FULL OUTER JOIN t2 ON t1.id = t2.fk All rows from both tables
  • CROSS JOIN t2 Cartesian product (all combinations)
  • self JOIN: FROM t1 a JOIN t1 b Join table with itself

Aggregation

  • COUNT(col) / COUNT(*) Count non-null values / all rows
  • SUM(col) Sum of values
  • AVG(col) Average of values
  • MIN(col) / MAX(col) Minimum / maximum value
  • GROUP BY col Group rows by column
  • HAVING COUNT(*) > 5 Filter groups (like WHERE for groups)

Data Modification

  • INSERT INTO t (col) VALUES (val) Insert single row
  • INSERT INTO t (col) VALUES (v1), (v2) Insert multiple rows
  • UPDATE t SET col = val WHERE id = 1 Update specific rows
  • DELETE FROM t WHERE id = 1 Delete specific rows
  • TRUNCATE TABLE t Remove all rows; logging, locking, and rollback behavior depend on the database

Table Operations

  • CREATE TABLE t (id INT PRIMARY KEY, ...) Create table
  • ALTER TABLE t ADD col TYPE Add column
  • ALTER TABLE t DROP COLUMN col Remove column
  • ALTER TABLE t RENAME TO new_name Rename table
  • DROP TABLE t Delete table
  • CREATE INDEX idx ON t(col) Create index

Sources

  • https://www.postgresql.org/docs/current/queries.html PostgreSQL query reference: clauses, joins, grouping, and limits.
  • https://www.postgresql.org/docs/current/sql-truncate.html PostgreSQL TRUNCATE: locking and transaction behavior.
  • https://dev.mysql.com/doc/refman/8.4/en/truncate-table.html MySQL 8.4 TRUNCATE: implicit commits and binary logging.

Related cheatsheets

  • Barcode Formats40 commands
  • JavaScript ES6+59 commands
  • Python Essentials59 commands

Guides that use these commands

  • Convert JSON to SQL INSERT Statements Without Losing TypesGuide · 6 min read
  • Convert a SQL Dump to CSV Without Restoring a DatabaseGuide · 7 min read
  • Convert CSV to SQL for PostgreSQL, MySQL, and SQLiteGuide · 7 min read

Tools for this work

  • CSV to SQLTurn a CSV into CREATE TABLE and INSERT statements for Postgres, MySQL, or SQLite.
  • JSON to SQLTurn a JSON array into CREATE TABLE and INSERT statements. Booleans and null survive.
  • SQL to CSVPaste a .sql dump and get a CSV per table. No database to restore.

From FindUtils

More to explore

Products and services from the team behind FindUtils.

Promote your tool
Featured product seeranks.com SeeRanks — transparent product discovery A public ranking board where paid placement is always labeled and every product keeps its earned position. View SeeRanks Public rank board #1 Sponsored #2 #3 #4 Paid placement is always labeled Free favicon tool emojifavicons.com Emoji Favicons Turn any emoji into a favicon with one HTML line. SVG, PNG or ICO, no sign-up. <link rel="icon" href=".../🦊.svg"> Create a favicon
FindUtils service findutils.com Articles for software tools A sourced article for your channels, or a sponsored FindUtils publication with editorial review. Compare packages Domain portfolio findutils.com Domain names for sale .com.dev.sh.app.io Unused names across dev tools, AI, PDF and commerce. Make an offer. Browse the list Playable ranking towerscore.io TowerScore — stack the skyline Play to climb, or buy a floor. Paid floors are labeled. Open TowerScore

Missing a tool you need?

Tell us what to build next. Most requests ship as a free browser tool, an API endpoint and an MCP tool.

Request a tool
FindUtils

Free, fast utilities. Most tools process your files in the browser; lookup tools say what they send, and pages load analytics and ads.

  • No sign-up for free tools
  • Most tools run in your browser
  • 369 tools on the REST API, 369 on MCP

Tools

DevelopersConvertPDFDesignSecurityAll tools →

Learn

GuidesBlogCheatsheetsChangelog

Build

REST APIMCP serverAPI referenceWorkflowsStatus

FindUtils

AboutLibraries we useSponsorRequest a toolDomains for saleContact
© 2026 FindUtils PrivacyTermsSitemap
Service status
FindUtils

Free, fast utilities that respect your data. Most tools run in your browser.

Build with it

REST APIMCP serverGuidesChangelog

FindUtils

AboutSponsorPrivacyContact
Theme
© 2026 FindUtils Terms
FindUtils
Guides Blog REST API MCP server Changelog

Categories

Developers 91 Convert 65 Calculate 32 Finance 32 Generate 31 Media 27
All 15 categories →

Keep it free

Sponsorship keeps every tool free and funds the new ones we ship each week.

Sponsor Back the project
Tools API Sponsor