By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
create table table_a (id number, column_1 char(4));
insert into table_a (id, column_1) values (1, 18);
1 rows affected
insert into table_a (id, column_1) values (2, '0018');
1 rows affected
select * from table_a;
ID | COLUMN_1 |
---|---|
1 | 18 |
2 | 0018 |
select * from table_a where column_1 = 18;
ID | COLUMN_1 |
---|---|
1 | 18 |
2 | 0018 |
select * from table_a where column_1 = '18';
ID | COLUMN_1 |
---|---|
1 | 18 |
select * from table_a where column_1 = '0018';
ID | COLUMN_1 |
---|---|
2 | 0018 |
select id, column_1, dump(column_1) from table_a;
ID | COLUMN_1 | DUMP(COLUMN_1) |
---|---|---|
1 | 18 | Typ=96 Len=4: 49,56,32,32 |
2 | 0018 | Typ=96 Len=4: 48,48,49,56 |
select cast(18 as char(4)) from dual;
CAST(18ASCHAR(4)) |
---|
18 |