有以下一个表
movestar(id,name,title,address),内容为:

现在要查找所有具有相同的title和address的人
select star1.name,star2.name,star1.title,star1.address from movestar as s
tar1,movestar as star2 where star1.title = star2.title and star1.address = star2.address and star1.name < star2.name;
结果:

本文展示了如何使用SQL语句查询数据库中具有相同title和address的用户,通过比较star1和star2两个别名的title和address字段,并确保name顺序递增。
1274

被折叠的 条评论
为什么被折叠?



