I want below output from CrossMatch Table where i am inserting two BID from Group table,one BID of Patient and Second BID of Donor
below is my data
- CREATE TABLE #Group(BID INT,BName VARCHAR(50))
- CREATE TABLE #Patient(PID INT,PName VARCHAR(50),BID int)
- CREATE TABLE #Donor(DID INT,DName VARCHAR(50),BID int)
- CREATE TABLE #CrossMatch(CID INT,PID int,DID int,BID(Patient) int ,BID(Donor) int )
-
-
- INSERT INTO #Group VALUES(1,'A')
- INSERT INTO #Group VALUES(2,'B')
- INSERT INTO #Patient VALUES(1,'Akhter','1')
- INSERT INTO #Donor VALUES(1,'Hussain','2')
- INsert into #CrossMatch Values(101,1,1,1,2)