I have one table with a column ID
and SERVICE_TYPE_TEXT
, and another table with columns
ID, SERVICE_TYPE ...
and lot
Try something like this,
SELECT a.ID AS ServiceID,
a.Service_Type_Text,
b.ID AS table2ID,
b.Service_Type
FROM table1 a
INNER JOIN table2 b
ON a.ID = b.Service_Type
Set your query so that it returns all data from the second table but only the required field (column) from the first.
Something like this:
SELECT TAB1.SERVICE_TYPE_TEXT, TAB2.*
FROM TAB1
INNER JOIN
TAB2
ON TAB1.ID = TAB2.SERVICE_TYPE
TRY
SELECT a.ID AS ServiceID,
a.Service_Type_Text,
b.ID AS table2ID,
b.Service_Type
FROM table1 a
INNER JOIN table2 b
ON a.ID = b.Service_Type AND b.ID='YOUR_ID';