I Have Created Following tables
1.Test_Student(Master) table which will contain StudentId(primary key), StudentName and StudentAddress as columns.
2. Test_Subject(Master) table which will contain SubjectId(primary key) and SubjectName as columns.
3. Test_StudentSubjectTrans (Transaction) table. This will be a transaction table between Test_Student and Test_Subject. This table will contain StudentId and SubjectId as foreign key.

Student Id Is Genrated Automatically By Identity

NOw While REgistering User Will Input His Personal Detail and Choose His Subject...But Thing IS That For subject He Can Choose Multiple Subject ...HOw Can Insert Student Id -Subject Id In
Test_StudentSubjectTrans
Means
If He Choose 4 subject
student Id Will Be Repeated 4 Times With 4 diffrent Subject Ids


Thanks & regards
Kaustubh

Recommended Answers

All 2 Replies

So what is the problem ?

student Id is not the Primay Key in Test_StudentSubjectTrans.

So what is the problem ?

student Id is not the Primay Key in Test_StudentSubjectTrans.

How Do I write Query For Insertion Where At the same Time Student choose...multiple subject.its working For single Subject.I want A query where By One Line Database will Be Filled By multiple Value

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.