2016-10-22 119 views

回答

1

WHERE子句用於將結果過濾爲使該子句爲真的所有項目,但是SUBSTRING()返回文本。你可能尋找下列之一:

UPDATE microwaves SET category = '' WHERE substring(category FROM '[0-9]+') is null; 

- 或 -

UPDATE microwaves SET category = '' WHERE substring(category FROM '[0-9]+') is not null; 
+0

更簡單:'WHERE類〜 '[0-9] +'' –

相關問題