34,590
社区成员
发帖
与我相关
我的任务
分享
select distinct name from A
union
select distinct name from B
select a.name from A inner join B on a.name=b.name
if object_id('t') is not null drop table t
create table t
(
name varchar(20),
number int
)
insert into t
select '安庆师范学院',536 union
select '安顺学院',508 union
select '安阳工学院',532 union
select '安阳工学院',516 union
select '安阳师范学院',530 union
select '安阳师范学院',510 union
select '鞍山师范学院',534 union
select '百色学院',509 union
select '百色学院',533 union
select '保定学院',509
go
select t.name
from
t
group by t.name
having COUNT(t.name)>1