clear markdown compare help best fiddles feedback
clear markdown feedback
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 3609963 fiddles created (46891 in the last week).

CREATE TABLE customers ( id int NOT NULL, first_name VARCHAR(50) NOT NULL, last_name VARCHAR(50) NOT NULL, city VARCHAR(50) NOT NULL, state VARCHAR(5), PRIMARY KEY (id) ); INSERT INTO customers (id, first_name, last_name, city, state) VALUES (1, 'François', 'Tremblay', 'Montreal', 'QC'), (2, 'Bjørn', 'Hansen', 'Oslo',null), (3, 'Helena', 'Holý', 'Prague', null), (4, 'Fernanda', 'Ramos', 'Brasília', 'DF'); SELECT CONCAT( '<Customer>', '<Id>', id, '</Id>', '<FirstName>', first_name, '</FirstName>', '<LastName>', last_name, '</LastName>', '<City>', COALESCE(city, ''), '</City>', '<State>', COALESCE(state, ''), '</State>', '</Customer>') customers_xml FROM customers LIMIT 2;
4 rows affected
 hidden batch(es)