簡體   English   中英

Oracle SQL查詢返回與沒有數字的列值匹配的行

[英]Oracle SQL query to return rows that matches a column value having not a digit

我使用以下Oracle SQL查詢列出具有除數字以外的值的列的行。

select * from XXX_ACCOUNTS_20110309 p 
  where regexp_like (bar_status,'[[^:digit:]]+');

上面的查詢不會返回任何行。

嘗試這個:

where bar_status like '%[^0-9]%'

試試(我無法測試)

select * from XXX_ACCOUNTS_20110309 p 
where not regexp_like (bar_status,'[[:digit:]]+');

要么

select * from XXX_ACCOUNTS_20110309 p 
where not regexp_like (bar_status,'^[[:digit:]]+$');

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM