I want to insert value of primary key of a table to the foreign key in another table in SQL Server.
Please help me out..
I want to insert value of primary key of a table to the foreign key in another table in SQL Server.
Please help me out..
AN EXAMPLE:
INSERT california_authors (au_id, au_lname, au_fname)
SELECT au_id, au_lname, au_fname
FROM authors
WHERE State = 'CA'