一个表
create table RSB
(
id char(6)
xm char(10)
)
insert into RSB values('1000','没什么')
insert into RSB values('1001','干什么')
insert into RSB values('1002','做什么')
insert into RSB values('1002','做什么')怎么样把里面重复的ID 给列出来呢?~~
create table RSB
(
id char(6)
xm char(10)
)
insert into RSB values('1000','没什么')
insert into RSB values('1001','干什么')
insert into RSB values('1002','做什么')
insert into RSB values('1002','做什么')怎么样把里面重复的ID 给列出来呢?~~
(
id char(6),
xm char(10)
)
insert into RSB values('1000','没什么')
insert into RSB values('1001','干什么')
insert into RSB values('1002','做什么')
insert into RSB values('1002','做什么')select id from RSB
group by id
having count(*)>1drop table RSB
group by id having count(*)>1
group by id having count(*)>1