Db2 Developer-C 11.1
Firebird 3.0
MariaDB 10.2
MariaDB 10.3
MariaDB 10.4
MySQL 5.6
MySQL 5.7
MySQL 8.0
Oracle 11g Release 2
Oracle 18c
Postgres 8.4
Postgres 9.4
Postgres 9.5
Postgres 9.6
Postgres 10
Postgres 11
Postgres 12
SQLite 3.8
SQLite 3.16 (currently unavailable)
SQLite 3.27
SQL Server 2012
SQL Server 2014
SQL Server 2016
SQL Server 2017
SQL Server 2017 (Linux)
SQL Server 2019
SQL Server 2019 CTP (Linux)
run
clear
markdown
compare
help
donate
or buy
diddy dollings
comments/suggestions/bugs
a leap of faith?
bible365
SQL Server 2019
SQLite 3.8
Postgres 10
Postgres 11
Postgres 9.5
Postgres 9.4
Postgres 8.4
Postgres 9.6
MySQL 8.0
Oracle 11g Release 2
MariaDB 10.2
Oracle 18c
Db2 Developer-C 11.1
MySQL 5.7
MySQL 5.6
Firebird 3.0
SQLite 3.27
MariaDB 10.4
MariaDB 10.3
SQL Server 2014
SQL Server 2016
SQL Server 2017
SQL Server 2017 (Linux)
SQL Server 2019 CTP (Linux)
SQL Server 2012
Fiddle Statistics
Postgres 12
≡
clear
markdown
donate
comments/suggestions/bugs
a leap of faith?
bible365
diddy dollings
By using db<>fiddle, you agree to license everything you submit by
Creative Commons CC0
.
635663 fiddles created (13296 in the last week).
create table tbl (fld1 text, fld2 text); insert into tbl values ('abc', 'D123'), ('xyz', 'D123'), ('abc', 'D125'), ('abc', 'D128'), ('def', 'D128'), ('abc', 'D789');
✓
6 rows affected
hidden batch(es)
select t1.* from tbl t1 where fld1 = 'abc' and exists (select 1 from tbl t2 where t2.fld2 = t1.fld2 group by fld2 having count(*) = 1);
fld1
fld2
abc
D125
abc
D789
…
hidden batch(es)