【发布时间】:2017-09-26 15:24:56
【问题描述】:
我需要一个 sql 查询,它从不同的表中检索信息并在数据网格中描述它们。这些是我的桌子
表名:注册
-reg_id(PK)
-date
-timebegin
-begin_photo_id
-timeend
-end_photo_id
-pupils_id
表名:学生
-pupils_id(PK)
-name
-surname
-mid_name
-group_id
表名:照片
-photo_id(PK)
-photo
查询含义:Select date, timebegin, timeend from register; Select photo from photos where photo_id=begin_photo_if and photo_id=end_photo_id,与注册表有关; Select concat(name, surname, mid_name) as fullname from pupils pupils.pupils_id=register.pupils_id。这意味着 register.pupils_id 必须是取自学生的全名。最后一个条件是向他们展示 group_id=combobox.selectedvalue 的位置。
结果列名应该是:
-fullname
-date
-timebegin
-photo
-timeend
-photo
where group_id=combobox_value
所以我需要一些帮助。
【问题讨论】:
-
一些帮助到底是什么?你期待有人为你写吗?