Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

How to insert values in two relational tables?

$
0
0

I have created four tables which all are related to each other as follows:

Table 1: Project

PrjID (Primary key) and ProjectTitle

Table 2: Student

StdID(Primary key) PrjID(Foreign Key) and StdName

Table 3: Course

CrsId(Primary key) and CourseTitle

Table 4: Teacher

TchID(Primary Key), CrsID(Foriegn Key), StdID(Foreign Key), YearSemester, NoOfSection, LabHours, and NoOfStudents.

What will be the SQL query to insert values in these all tables at a time or individually without any kind of conflict? waiting reply its too much important please


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>