TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Akhter HUssain
720
1.3k
102.3k
Two Foreign key in one table?
Feb 3 2020 11:49 PM
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)
Reply
Answers (
3
)
select query with two foreign Key require
Can I Give Description for a TABLE like in Procedure?