sql语句

Posted zhangzhonglin2018

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql语句相关的知识,希望对你有一定的参考价值。

1、模糊查询字段含有的指定的内容 select *from tablename where user like ‘%指定的字符串%‘  

精确的查找  select *from tablename where user substring(user,‘指定位置‘,‘长度’)==‘指定值’

 

2、查找字段值重复的次数 

SELECT writer,count(*) as totals from tablename  where writer=‘值‘ having count(1)>0

以上是关于sql语句的主要内容,如果未能解决你的问题,请参考以下文章

MYBATIS05_ifwherechoosewhentrimsetforEach标签sql片段

动态SQL基础概念复习(Javaweb作业5)

Mybatis超强大的动态SQL大全

mybatis学习日志二

使用 with as 优化SQL

Mybatis超强大的动态SQL大全