gpt4 book ai didi

mysql - 如何获取MySql数据库中多个表的日期?

转载 作者:行者123 更新时间:2023-11-30 23:28:36 26 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
how to get details from multiple tables?

在MySql数据库中有五个表

Course

c_id name course_desc
101 java sometext…..

User

u_id firstname Address
201 ram Hyd

SkillSet

S_id c_id u_id experience course_content
301 101 201 2 somtext…

Timetable

T_id c_id u_id date_time class_duration(H)
401 101 201 2012-08-08 2

Intrest

I_id t_id u_id
501 401 201

我的问题是,我正在传递开始日期和结束日期以及名称(类(class)名称),然后我想获取类似

的详细信息
Name(courseName),course_desc,firstname


select course.c_id,course.course_desc,user.firstname
from COURSE course
inner join SKILLSET skill on skill.course_id=course.c_id
inner join USER user on user.c_id=skill.u_id
inner join TIMETABLE tt on skill.c_id=tt.u_id
where course.name='java'
and tt.date_time BETWEEN '2012-08-07 00:00:00' AND '2012-08-20 00:00:00'

它显示错误.. 请帮助我...... ...

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com