展开全部
你可以再新建立一个表。把那两个表的id放到里面。从而使用sql 中的select检索
或者 在select中嵌套where语句
或者 在select中嵌套where语句
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
A表字段ID,Address
B表字段ID,Name
C表字段ID,Address,Name
insert into C
select A.ID,A.Address,B.Name from A,B where A.ID= B.ID And A.Address='你的条件'
B表字段ID,Name
C表字段ID,Address,Name
insert into C
select A.ID,A.Address,B.Name from A,B where A.ID= B.ID And A.Address='你的条件'
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
create table table_008 (
id int,val int);
insert into table_008 values(1,123);
insert into table_008 values(2,124);
insert into table_008 values(3,125);
create table table_009(
id int,val int,name varchar2(8));
insert into table_009 values (1,123,'name1');
insert into table_009 values (2,124,'name2');
insert into table_009 values (3 ,125,'name3');
insert into table_009 values (4,123,'name4');
insert into table_009 values (5 ,123,'name5');
insert into table_009 values (6,124,'name6');
create table table_011(
id int,
val int,
name varchar2(10));
insert into table_011(
id,val,name) select a.id,a.val,b.name from table_008 a,table_009 b where a.id=b.id;
id int,val int);
insert into table_008 values(1,123);
insert into table_008 values(2,124);
insert into table_008 values(3,125);
create table table_009(
id int,val int,name varchar2(8));
insert into table_009 values (1,123,'name1');
insert into table_009 values (2,124,'name2');
insert into table_009 values (3 ,125,'name3');
insert into table_009 values (4,123,'name4');
insert into table_009 values (5 ,123,'name5');
insert into table_009 values (6,124,'name6');
create table table_011(
id int,
val int,
name varchar2(10));
insert into table_011(
id,val,name) select a.id,a.val,b.name from table_008 a,table_009 b where a.id=b.id;
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询