tbl_1 : TypeID(pk) Product Type 1 ELectronic Online 2 Health Offline 3 Cloth Online
tbl_2 : ID(pk) Name TypeID(fk) 1 Akon 1 2 Nancy 3 3 Sam 1 4 John 2 5 Rack 3
Result : ID Name TypeID Type 1 Akon 1 Online 2 Nancy 3 Online 3 Sam 1 Online 4 John 2 Offline 5 Rack 3 Online
Any suggestion really appreciate :
SELECT a.*, b.* FROM table1 AS a INNER JOIN table2 AS b ON a.typeid = b.typeid
select tbl_2.*, tbl_1.[Type] from tbl_2 Inner join tbl_1 on tbl_2.TypeId = tbl_1.TypeId
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)