[英]Search letter from beginning of words in SQL
I have in my database several lines like: 我的数据库中有几行,例如:
Number One
Number Two
Number Oito
I want a query that match the line 1 and 2 by typing 'O'; 我想输入“ O”来匹配第1行和第2行的查询;
I have this: 我有这个:
SELECT * FROM table WHERE field LIKE 'O%';
This looks the beginning of the first word only 这只是第一个单词的开头
利用空白
WHERE field LIKE '% O%' OR field LIKE 'O%';
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.