You are here: SQL question « MsSQL Server « IT news, forums, messages
SQL question

Posted by dwightarmyofchampions on 07/07/07 18:59

How do you combine two SELECT statements from two different tables
into one result (assuming bioth tables have the exact same fields)?

Like, assuming that the query SELECT * FROM Table1 gives the result

ID Name
001 Smith
002 Jones

and the query SELECT * FROM Table2 gives the result

ID Name
247 Simpson
856 Beckley

I want a SELECT ... ORDER BY ID statement that will output the
following data:

ID Name
001 Smith
002 Jones
247 Simpson
856 Beckley

How do I do this?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация