By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
create table mytable(
reject_remarks varchar(200)
);
insert into mytable values
('Will0017'),
('Will0018'),
('Kind0045'),
('DGRG0012');
SELECT reject_remarks, REGEXP_REPLACE(reject_remarks, '[^0-9]+', '') AS numbers
FROM mytable;
Records: 4 Duplicates: 0 Warnings: 0
reject_remarks | numbers |
---|---|
Will0017 | 0017 |
Will0018 | 0018 |
Kind0045 | 0045 |
DGRG0012 | 0012 |