I'm trying to write a select statement that returns column A when column B contains '0' or '9' or '00' or '99' or '000' or '999' and so forth. The values are TEXT. Any help is appreciated!
You could use:
SELECT colA
FROM tab
WHERE REPLACE(colB, '9', '') = ''
OR REPLACE(colB, '0', '') = '';
SELECT * FROM选项卡WHERE像'%9%'或像'%0%'的列
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.