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.
| Author |
Topic |
|
jailiamanisha
Starting Member
1 Post |
Posted - 2006-06-27 : 02:39:48
|
| hii frens i am new member in this group .i hv problem that i hv 2 table contain same attributes i want to append second table in first one in sql server. |
|
|
mwjdavidson
Aged Yak Warrior
735 Posts |
Posted - 2006-06-27 : 02:48:33
|
| [code]INSERT INTO table1 (col1, col2, col3)SELECT col1, col2, col3FROM table2[/code]or if you want a new table (table3 in this case) containing both tables' records:[code]SELECT col1, col2, col3INTO table3FROM table1UNION ALL SELECT col1, col2, col3FROM table2[/code]Mark |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-06-27 : 03:52:06
|
| If it is for display thenSelect columns from table1Union allSelect columns from table2Alternatively you can create view having this query and use that viewMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|