Sql server 在SQL Server中将值从一个表插入到另一个表中

Sql server 在SQL Server中将值从一个表插入到另一个表中,sql-server,Sql Server,我想将一个表的主键的值插入SQL Server中另一个表的外键 请帮帮我。这里有一个例子: Insert Into FKTable (FKValue) Select PKValue From PKTable INSERT california_authors (au_id, au_lname, au_fname) SELECT au_id, au_lname, au_fname FROM authors WHERE State = 'CA' 选择PrimaryKey 变成牛顿表 从OldTa

我想将一个表的主键的值插入SQL Server中另一个表的外键

请帮帮我。

这里有一个例子:

Insert Into FKTable (FKValue)
Select PKValue
From PKTable
INSERT california_authors (au_id, au_lname, au_fname)
SELECT au_id, au_lname, au_fname
FROM authors
WHERE State = 'CA'
选择PrimaryKey 变成牛顿表
从OldTable中

您尝试了什么?你哪里有麻烦?您是否遇到错误?如果是,是什么??