student表的courses字段,存着course的id,现在需要学生的所有课程用字符串的形式查出

student表

id name courses
1 小明     44,55,66
2 小红 11
3 小紫 22,44

course表

id name
11 数学
22 语文
66 英语
44 体育
55 美术

查询sql

select a.*,to_char(wm_concat(b.name)) from student a,course b  where instr(b.id, a.courses ) > 0

  

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2022-02-04
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-04
相关资源
相似解决方案