I want to display product's barcode in the grid. How can I write sql query to function this?
my grid column:-
SI.No Barcode productName
I have two tables, 1) tbl_product, 2) tbl_Batch.
tbl_Product
--------------
productId
productName
productRate
batchId
tbl_Batch
------------
batchId
batchName
barcode
Give me the sql query to this.

Posted Oct 18, 2013, 6:00 AM
try this below
Select b.barcode,p.productrname from tbl_batch b join tbl_product p where b.batchid=p.batchid