早教吧 育儿知识 作业答案 考试题库 百科 知识分享

若有两张表假设A表有值1,2,3B表有值3,4,5怎样查询出结果为12345和123345这两种结果

题目详情
若有两张表 假设A表有值1,2,3 B表有值3,4,5 怎样查询出结果为12345和123345这两种结果
▼优质解答
答案和解析
查询出结果为12345
select A.ID,B.ID from A,B where B.ID not in(select B.ID from A,B where A.ID = B.ID);
查询出结果为123345
select A.ID,B.ID from A,B ;