0
如何刪除列字段之間的所有空格?空格出現在文本的中間,所以修剪將不起作用,替換也不起作用。 我的代碼是刪除mySQL中的空白值
UPDATE temp_emp t1, master_employee t2
SET t1.lm= t2.emp_id
where REPLACE(t1.lm, ' ', '') = REPLACE(CONCAT(t2.first_name,'',t2.last_name), ' ', '');
例如,當我運行查詢,
select REPLACE(lm, ' ', '') AS concat from temp_emp1
我得到的輸出如下
concat
----------------------------------------
rick joe
james cole
albert Th
我所要的輸出是,這樣
concat
----------------------------------------
rickjoe
jamescole
albertTh
樣本數據將更加積極主動的答案 – mohan111
OKK做@ mohan111 –
http://stackoverflow.com/questions/6940646/mysql-how-to-remove-double-or-more-spaces-from-a-string – mohan111