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 |
|
amirs
Constraint Violating Yak Guru
260 Posts |
Posted - 2009-04-29 : 00:15:29
|
| hi i have two table tab1 and tab2 as same colomn name. how to dispaly record of first tab1 and below this table display second table tab2 records as same col name |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-04-29 : 00:30:28
|
[code]select *from tab1union allselect *from tab2[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
amirs
Constraint Violating Yak Guru
260 Posts |
Posted - 2009-04-29 : 00:37:49
|
| thanks to replaybut i have display another resultssuppose tab1name age bdatea 20 12-10-1989b 30 12-10-1979c 10 12-01-1999 tab2 name age bdatee 15 12-10-1994f 25 12-10-1984g 35 12-01-1974i have display recordsname age bdatea 20 12-10-1989b 30 12-10-1979c 10 12-01-1999 e 15 12-10-1994f 25 12-10-1984g 35 12-01-1974 |
 |
|
|
aprichard
Yak Posting Veteran
62 Posts |
Posted - 2009-04-29 : 00:43:24
|
| You try itSELECT Name, Age, BDate FROM Table1UNION ALLSELECT Name, Age, BDate FROM Table2ORDER BY Name |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-04-29 : 00:44:13
|
what is the expected result ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
amirs
Constraint Violating Yak Guru
260 Posts |
Posted - 2009-04-29 : 01:11:58
|
| thanks to all i use union all and dispay correct results |
 |
|
|
|
|
|