select substring(people,charindex('$',people)+1,len(people)-charindex('$',people)) from tablename
people是字段名,$是指定字符。
該語句是獲取美元符號 $之後的值。
select substring(people,0,charindex('$',people)) from tablename;
該語句是獲取美元符號 $之前的值。
作者:zl_shitou
來源:CSDN
原文:https://blog.csdn.net/zl_shitou/article/details/78801933
版權聲明:本文爲博主原創文章,轉載請附上博文鏈接!