I am working with BDS 2006,MySQL DB (MyDAC components used for connection) and i have a DBGrid
component on my form which displays the records from my DB table.
Now i need to JOIN
two tables and display the results in my DBGrid
The Resulting view that I should get is the result of the query
SELECT e_salary.e_basic,e_details.e_name
FROM e_details
INNER JOIN e_salary
ON e_details.e_id=e_salary.e_id;
there is one more option to do it as I searched
SELECT
e_salary.e_basic,e_details.e_name
FROM
e_details, e_salary
WHERE
e_details.e_id=e_salary.e_id;
e_details,e_salary are my two tables and e_id is my PRIMARY KEY
Presently I am having 2 DBGrid
one is for e_details and other for e_salary
Is it possible to have only 1 DBGrid displaying values from both the Tables? or I have to display 2 separate DBGrid
?
If possible then how do I go about it
P.S.- there are more columns to be added in the view and both tables have same no of rows
Thanks in advance