Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 "INSERT" statement

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-09-26 : 07:57:02
Mohamed writes "how do i write the "insert" statement for two joined tables.

For 1 table, i know it is
'insert into table_name() values().

But for 2 tables which are related(joined by a primary/foreing key in ms access) just like in the case for 'select' statement?"

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-09-26 : 08:03:23
Is this?

Insert into Table1(columns)
Select columns from Table2

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -