A few days ago, some data should be exported to other systems. During this period, some field values containing spaces have to be processed. I searched it online and combined with my own practice, and I got the following summary:
--一定找的出来
select * FROM a WHERE instr(user_name,' ')>0;
SELECT * FROM a WHERE REGEXP_LIKE(user_name, '( )+');
--不一定找的出来
SELECT * FROM a WHERE length(user_name) > length(trim(user_name));
SELECT * FROM a WHERE substr(user_name,-1)=' ';