Free SQL COALESCE Generator

Build COALESCE expressions visually. Handle NULL values by returning the first non-NULL value from a list.

COALESCE returns the first non-NULL value. Drag to reorder or use arrows.

1.

Column: A column name (e.g., phone_mobile)

String: Text value, will be quoted (e.g., 'N/A')

Number: Numeric value (e.g., 0)

Expression: SQL expression (e.g., price * 0.9)

Add at least one value to generate COALESCE

-- Add at least one value

Your data stays private

This tool runs entirely in your browser. Your column names and values are never sent to any server.

Other Tools

Try our other free tools!

SQL Syntax Checker

Validate SQL syntax across multiple database dialects

SQL Formatter

Beautify and format SQL queries with customizable options

Text to SQL

Convert natural language to SQL queries with AI

SQL Minifier

Compress SQL queries by removing whitespace

SQL Compare

Compare SQL queries and see differences

DBML to SQL

Convert DBML schemas to SQL DDL

SQL to DBML

Convert SQL DDL to DBML schemas

SQL Query Explainer

Explain SQL queries in plain English with AI

SQL Dialect Converter

Convert SQL between different database dialects

SQL UPDATE Generator

Build UPDATE queries with a visual form builder

SQL LIKE Tester

Test LIKE patterns with % and _ wildcards

SQL DELETE Generator

Build DELETE queries with safety warnings

SQL GROUP BY Generator

Build GROUP BY queries with aggregate functions

SQL DISTINCT Generator

Find unique values with SELECT DISTINCT

SQL CASE WHEN Generator

Build conditional expressions with CASE WHEN

SQL JOIN Generator

Build multi-table JOIN queries visually

SQL ORDER BY Generator

Build sorting queries with ORDER BY

SQL BETWEEN Generator

Build range queries with BETWEEN

SQL COUNT Generator

Build COUNT queries with GROUP BY

SQL SUBSTRING Generator

Extract string parts with SUBSTRING

SQL COALESCE Guide & FAQ

Need to see which columns allow NULL?

ChartDB visualizes your entire database schema, showing which columns are nullable at a glance. Understand your data model before writing COALESCE expressions.

See nullable columnsVisualize table relationshipsImport from any database
Try ChartDB Free

No credit card required