SQLite 如何实现从一个数据库的某个表的记
1个回答
展开全部
insert into tableb..bb(b1,b2,b3) select a1,a2,a3 from tablea..aa
insert into 数据库1.a(id,name...)select id,name...from 数据库2.b
insert into tableb(b1,b2,b3) select a1,a2,a3 from[wjjj].[dbo].[fbase]
insert into tableb(b1,b2,b3) select a1,a2,a3 from[数据库2名].[dbo].[表]
实例:
create database Testa
use Testa
create table Tablea
(
id int primary key identity(1,1) not null,
userName varchar(50) not null,
pwd varchar(50) not null,
age int not null
)
create database TestB
use TestB
create table Tableb
(
id int primary key identity(1,1) not null,
ageb int not null,
pass varchar(50) not null
)
insert into Tableb(ageb,pass) select age,pwd from Testa.dbo.Tablea
insert into Tablea(age,pwd) select ageb,pass from TestB.dbo.Tableb
insert into 数据库1.a(id,name...)select id,name...from 数据库2.b
insert into tableb(b1,b2,b3) select a1,a2,a3 from[wjjj].[dbo].[fbase]
insert into tableb(b1,b2,b3) select a1,a2,a3 from[数据库2名].[dbo].[表]
实例:
create database Testa
use Testa
create table Tablea
(
id int primary key identity(1,1) not null,
userName varchar(50) not null,
pwd varchar(50) not null,
age int not null
)
create database TestB
use TestB
create table Tableb
(
id int primary key identity(1,1) not null,
ageb int not null,
pass varchar(50) not null
)
insert into Tableb(ageb,pass) select age,pwd from Testa.dbo.Tablea
insert into Tablea(age,pwd) select ageb,pass from TestB.dbo.Tableb
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询