110,534
社区成员
发帖
与我相关
我的任务
分享
insert 表B(id,username,cishu) select id,username,cishu
from 表A
create database DevTest
go
use DevTest
go
create table info
(
id int,
username varchar(20)
)
go
insert into info values(1,'ddd')
insert into info values(2,'fff')
insert into info values(3,'ttt')
go
create table info1
(
id int,
username varchar(20),
cishu int default(2)
)
go
insert into info1([id],[username])
select [id],[username] from info
go
select * from info1
go