Computer Science, asked by sweetyshiny1740, 1 year ago

How to retrieve two different table data with common primary key use as a foriegn

Answers

Answered by LuckyYadav2578
5

Take table name = Table1 and Table2

Data that you want to retrieve is = ColumnA and ColumnB

Primary key is common i.e let that primary key be = PrimaryKey (of both the tables)

Now the question will become or your question can be written as :-

Write code to retrieve data - ColumnA from Table1 and ColumnB from Table2?

Select ColumnA, ColumnB

from Table1 , Table2

where PrimaryKey.Table1 = PrimaryKey.Table2


letshelpothers9: nice ans :)
LuckyYadav2578: Thank You :)
Similar questions