![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
sql
t156xxxx4671
你的小宝贝上线了
展开
-
sql筛选重复数据
1、单个字段去除重复值select distinct '字段名' from '表名'2、如果需求不仅仅是找出某一个字段的唯一值,我们还想查看一下,这个字段拥有重复值的几条数据,进一步分析重复的原因,那就需要用到下面的语句:select code,count(code) from report_detailed group by code having count(code)>1 order原创 2017-07-12 16:41:36 · 18977 阅读 · 0 评论 -
oracle中substr() instr() 用法
转载自:https://www.cnblogs.com/miaoying/p/5784947.html--substr(字符串,截取开始位置,截取长度)=返回截取的字select substr('miaoying',0,1) from dual;--返回结果为:mselect substr('miaoying',1,1) from dual;--返回结果为:m--说明0和1都表示截取的位置为第一转载 2017-12-21 10:33:24 · 330 阅读 · 0 评论 -
如何将两个字段合成一个字段显示(oracle和sqlserver的区别)
oracle中,如何将两个字段数据合并成一个字段显示,接下来看一下在sql server和pl/sql的区别sql server中如何合并(用Cast()函数)--1、创建模拟的数据表---create table GoodsCate( Mid int not null, Code varchar(10) not null, Name varchar(20) no...转载 2018-12-17 13:52:34 · 7252 阅读 · 0 评论