noulouk
asked on
Merge SELECT
Hi Experts,
SELECT Name From TableName WHERE id=1
SELECT FirstName From TableFirstName WHERE id=1
I want a result in 1 resultset like this:
Name | FirstName
Thanks in advance for your help.
SELECT Name From TableName WHERE id=1
SELECT FirstName From TableFirstName WHERE id=1
I want a result in 1 resultset like this:
Name | FirstName
Thanks in advance for your help.
ASKER
OK, but I have several columns to select in my tables like this:
SELECT Name, Name2, Name3 From TableName WHERE id=1
SELECT FirstName,FirstName2,... From TableFirstName WHERE id=1
Sorry.
SELECT Name, Name2, Name3 From TableName WHERE id=1
SELECT FirstName,FirstName2,... From TableFirstName WHERE id=1
Sorry.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I 'm agree dqmq.
I will ask a new question.
I will ask a new question.
SELECT (SELECT Name From TableName WHERE id=1) Name ,
(SELECT FirstName From TableFirstName WHERE id=1) FirstName
Otherway is join the two tables, for which we need information on how these two tables are related