开发者

How to fetch records form three table

开发者 https://www.devze.com 2022-12-17 22:20 出处:网络
TableName :: Feedback_master Fields 1. feed_开发者_StackOverflowid 2. roll_id 3. batch_id 4. sem_id (semester ID)

Table Name :: Feedback_master

Fields 1. feed_开发者_StackOverflowid 2. roll_id 3. batch_id 4. sem_id (semester ID) 5.f_id (faculty Id) 6. sub_id (subject Id) 7. remark. 8. b_id

Table Name :: subject_master

Fields

  1. sub_id (subject Id)
  2. sub_name (Subject Name0
  3. f_id ( Faculty ID)

Table Name :: faculty_master

Fields

  1. f_id (Faculty Id)
  2. f_name (Faculty Name)
  3. l_name (Faculty Name)
  4. b_id

This are the three tables. Now I want to fetch the detail from this three table.

I want the output as

f_Name (faculty name), Sub_name (Subject Name ) , remark (Remark )

could some one help me to over come this problem.


something like...

select fm.remark, sm.sub_name, fcm.f_name from Feedback_master fm
left join subject_master as sm  On fm.sub_id = sm.sub_id
left join faculty_master as fcm On fcm.f_id = sm.f_id
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号