memorandum

IT技術の習得を記録します

mysql 複数の文字列の置換 replace / 文字列の結合 concat

下記の場合は、姓名をconcatで結合し、そこから空白文字(半角スペース・全角スペース・タブ)を置換している

replace(replace(replace(concat(last_name,first_name),' ',''),'\t',''),' ','') = '#{fullname}'