[英]To identify special characters in a column in SQL
從下面的示例數據中,我需要確定包含“ NULL”的銀行帳戶或包含特殊字符(如)的值。 和+。
請幫助SQL查詢。
Country code Country no.
CN 1.41601002200003E+16
KR 1081100499433
DK 5005923427
GB 20451053
CH 86381881
SE 51017374
CA 101798545
AE 90010200008612
AT NULL
US 1134133639
BE 220000422994
IT 1264
CN 1.1006058714634E+17
AT NULL
您可以將like
與專有字符集一起使用:
select t.*
from t
where t.country_no like '%[^0-9]%' or t.country_no is null;
如果問題僅在於大量數字不正確,則將它們轉換為字符串:
select str(t.country_no, 20)
from t
where t.country_no like '%[^0-9]%' or t.country_no is null;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.