Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以我有一个型号数据库。我需要做的是,如果存储的型号是“ ABCD1234”并且用户搜索“ BCD123”,它仍然会返回结果。如果数据库条目在开头或结尾包含搜索到的模型#,则使用“ like”对我有用,但我需要在数据库条目包含搜索到的数字时返回结果的东西。谢谢!
ABCD1234
BCD123
like
用 % 包围搜索文本,例如:
SELECT * FROM table WHERE model LIKE '%BCD123%';