Good noon to every one my query is that i have one table name Purchase&Sales and two different field Purchase Sales the data which will be in Purchase text box will be fetch from Total purchase table and the data will be in sales table will be fetch from Total Sales Table means the both Value will come from different table to one table So please Give me a syntax or some idea Hoping for your Great and positive response
3 Answers
SELECT
S.Total, -- selecting from one table
P.Total -- selecting from another table
FROM
Sales S
INNER JOIN -- inner join if you can or similar
Purchase P
ON
S.PurchaseId = P.ID
see here for more info http://www.techrepublic.com/article/sql-basics-query-multiple-tables/