[英]Exclude description of the product from the search result of the product
Can I exclude description of the product from the search result of the product - SQL query to the database in which file? 我可以从产品的搜索结果-SQL查询到哪个文件的数据库中排除产品的描述吗? I want to search products only by Name and product tag not description. 我只想按名称和产品标签而不是描述来搜索产品。
Without seeing the table schema, I'll assume you have a table called Product and a field called ProductName. 在没有看到表模式的情况下,我假设您有一个名为Product的表和一个名为ProductName的字段。
SELECT ProductName
FROM Product
WHERE ProductName like '%Some Product%'
If you wanted to see all fields, use the all syntax 如果要查看所有字段,请使用all语法
SELECT *
FROM Product
WHERE ProductName like '%Some Product%'
If you have a very large product table, this may take some time to return. 如果产品表很大,则可能需要一些时间才能返回。 You typically want to have your query be as selective as possible. 通常,您希望查询尽可能具有选择性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.