比如车牌 晋A12345 中的 晋 字。有的行是没有的,只要删除有的
sql语句:
-- Oracle
update
表
set
列 =
replace
(列,
'晋'
,
''
)
where
列
like
'%晋%'
or
update
表
set
列 =
'晋'
|| 列
where
列
not
like
'%晋%'
-- MySQL
update
表
set
列 =
replace
(列,
'晋'
,
''
)
where
列
like
'%晋%'
or
update
表
set
列 = CONCAT(
'晋'
,列)
where
列
not
like
'%晋%'
-- SQLServer
update
表
set
列 =
replace
(列,
'晋'
,
''
)
where
列
like
'%晋%'
or
update
表
set
列 =
'晋'
+列
where
列
not
like
'%晋%'