select zhangid ,jietitle ,content from book where concat(ifnull(book.jietitle,''),ifnull(book.content,''),ifnull(book.zhangid,'')) like '%网络%';
搜索功能时较实用
效果如图

本文深入探讨了使用SQL进行高效数据库查询的方法,特别是如何利用concat和like语句精确搜索包含特定关键词的数据记录,通过示例展示了如何组合字段值进行模糊匹配。
select zhangid ,jietitle ,content from book where concat(ifnull(book.jietitle,''),ifnull(book.content,''),ifnull(book.zhangid,'')) like '%网络%';
搜索功能时较实用
效果如图


被折叠的 条评论
为什么被折叠?