Click here to Skip to main content
15,917,062 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Dear all i am trying to create a software for a book tread company...
But the problem is i am not able to connect to fatch the data from two table in sql....
format is like this ... book ISBN Is the primary key.
in one table i have isbn , book name , price.
and the another table i have isbn , creator of isbn.....

the componey requirement is in one form they want to know which isbn,title is created by whom. so on the bases of isbn i have to fatch data from two diffrent table of sql and in windows form show in a single form like 1.ISBN, 2.TITLE, 3.PRICE, 4.CREATE BY.


Dear friend please ignore the English Mistake and pleae help me to create this page .......

thanks in advance....
Posted

1 solution

To fetch the data from two different tables You can use the join queries:

If first table name: first and second table name: second

SELECT first.isbn, first.bookName, first.price, second.creator
FROM first
INNER JOIN second
ON first.isbn=second.isbn

If not satisfied please clear your question again.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900