sqlserver关于用一个sql语句批量添加数据的问题

2025-02-25 17:05:56
推荐回答(5个)
回答1:

insert into cust(name,pwd)
select name,pwd from users;
因为cust的id是自增,不需要插入数据。
欢迎追问。

回答2:

insert cust(name,pwd) select name,pwd from users where name not in(select name from cust)

向cust表插入不存在的用户名和密码

回答3:

没看清题目
insert into cust select name,pwd from users

回答4:

select name,pwd from user into cust where user.id=cust.id

回答5:

自增长标识可更新?