Db2 Developer-C 11.1
Firebird 3.0
MariaDB 10.2 (unavailable)
MariaDB 10.3
MariaDB 10.4
MariaDB 10.5
MariaDB 10.6
MySQL 5.5
MySQL 5.6
MySQL 5.7
MySQL 8.0
Oracle 11g Release 2
Oracle 18c
Oracle 21c
Postgres 8.4 (unavailable)
Postgres 9.4 (unavailable)
Postgres 9.5
Postgres 9.6
Postgres 10
Postgres 11
Postgres 12
Postgres 13
Postgres 14
SQLite 3.8 (unavailable)
SQLite 3.16 (unavailable)
SQLite 3.27
SQL Server 2012 (unavailable)
SQL Server 2014
SQL Server 2016
SQL Server 2017
SQL Server 2017 (Linux)
SQL Server 2019
SQL Server 2019 (Linux)
YugabyteDB 2.6
YugabyteDB 2.8
No sample DB
run
clear
markdown
compare
help
best fiddles
feedback
Fiddle Statistics
MySQL 8.0
SQLite 3.27
Oracle 18c
Firebird 3.0
MariaDB 10.4
MySQL 5.7
MySQL 5.6
MySQL 5.5
MariaDB 10.3
Db2 Developer-C 11.1
SQL Server 2014
SQL Server 2016
SQL Server 2017
SQL Server 2017 (Linux)
SQL Server 2019 (Linux)
SQL Server 2019
YugabyteDB 2.8
Oracle 21c
MariaDB 10.5
Oracle 11g Release 2
Node.js 18
MariaDB 10.6
YugabyteDB 2.6
Postgres 12
Postgres 9.5
Postgres 11
Postgres 10
Postgres 9.6
Postgres 13
Postgres 14
≡
clear
markdown
feedback
By using db<>fiddle, you agree to license everything you submit by
Creative Commons CC0
.
3601568 fiddles created (47973 in the last week).
create table mytable (ConstantValue varchar(100));
✓
hidden batch(es)
insert into mytable values ('1252.36'),('abc'),('55969'),('def'),('66955663'),('A8879'),('-41.25'),('+636');
✓
hidden batch(es)
alter table mytable add column NewConstantValue double default(0);
✓
hidden batch(es)
update mytable set ConstantValue = '0' where ConstantValue not regexp '^(-|\\+)?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+|[0-9]+)$';
✓
hidden batch(es)
update mytable set NewConstantValue = cast(ConstantValue as double);
✓
hidden batch(es)
select * from mytable;
ConstantValue
NewConstantValue
1252.36
1252.36
0
0
55969
55969
0
0
66955663
66955663
0
0
-41.25
-41.25
+636
636
…
hidden batch(es)
alter table mytable drop column ConstantValue;
✓
hidden batch(es)
alter table mytable change column NewConstantValue ConstantValue double default(0);
✓
hidden batch(es)
select * from mytable;
ConstantValue
1252.36
0
55969
0
66955663
0
-41.25
636
…
hidden batch(es)