标题:如何关联两个表
只看楼主
sdta
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:江苏省连云港市
等 级:版主
威 望:323
帖 子:9621
专家分:26174
注 册:2012-2-5
得分:0 
CREATE CURSOR sfz (姓名 c(10), sfzh c(18))
INSERT INTO sfz VALUES ("01", "12a")
INSERT INTO sfz VALUES ("02", "12b")
INSERT INTO sfz VALUES ("03", "12c")
INSERT INTO sfz VALUES ("04", "12d")
INSERT INTO sfz VALUES ("05", "12a")
INSERT INTO sfz VALUES ("06", "12d")
SELECT * FROM sfz WHERE sfzh in (SELECT sfzh FROM sfz GROUP BY sfzh HAVING COUNT(*) > 1) ORDER BY sfzh

坚守VFP最后的阵地
2021-03-27 06:21



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-493801-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.022948 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved