Home > Database > Mysql Tutorial > sqlserver删除数据冗余,高手请解释下!thank you

sqlserver删除数据冗余,高手请解释下!thank you

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:34:06
Original
1148 people have browsed it

思路?大哥你几年级的 看条件 where ConID = t.ConID and len (GeoNo) len (t.GeoNo) 把 Insert into tb_Table (GeoNo,Title,ConID) values ('01','北京','1000') Insert into tb_Table (GeoNo,Title,ConID) values ('0101','海淀区','1000') Insert into tb

思路?大哥你几年级的

 

看条件where ConID=t.ConID andlen(GeoNo)>len(t.GeoNo)

Insert into tb_Table (GeoNo,Title,ConID) values ('01','北京','1000')
Insert into tb_Table (GeoNo,Title,ConID) values ('0101','海淀区','1000')
Insert into tb_Table (GeoNo,Title,ConID) values ('010101','上地','1000')

弄成

Insert into tb_Table (GeoNo,Title,ConID) values ('010101','上地','1000')

这3条的ConID相同,留下GeoNo长度最大的

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Problem with tp6 connecting to sqlserver database
From 1970-01-01 08:00:00
0
0
0
Unable to connect to SQL Server in Laravel
From 1970-01-01 08:00:00
0
0
0
Methods of parsing MYD, MYI, and FRM files
From 1970-01-01 08:00:00
0
0
0
SQLSTATE: User login failed
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template