现有3个数据库A、B、C
A有Account(char,20)
B有Uid(int,4),Account(char,20)
C有Uid(int,4),name(char,20),key(text,16)
B表和C表通过Uid关联,Uid是非空,是主键要实现根据A表中的Account往B,C两张表中加,该如何做?
A有Account(char,20)
B有Uid(int,4),Account(char,20)
C有Uid(int,4),name(char,20),key(text,16)
B表和C表通过Uid关联,Uid是非空,是主键要实现根据A表中的Account往B,C两张表中加,该如何做?
第一步先将A表数据导入B表
insert B (Account)values select Account from A 第二步将B表数据导入C表insert C (Uid)values select Uid from A
insert C (Uid)values select Uid from B