sql问提3表查询

2025-12-16 05:18:29
推荐回答(6个)
回答1:

你的boorrowdate是什么格式的,你传的当天时间跟数据库的时间格式不对肯定查不出来数据,那样你可以用between 当天日期 00:00:00 and 当天日期 23:59:59

回答2:

你要什么样的信息?如果是只是所有信息就不用条件了,有什么排列要求没有
不要说所有信息,就说你要什么内容

回答3:

select * from bookmessage a,booklendtable b,readermessage c where a.id=b.bookcode and c.readernum =b.usercode and boorrowdate = 当天时间

回答4:

三表连查SQL语句:
select s.Sname , cs.CorseName , c.Score
from Students as s
inner join Score as c on (s,Scode = c.StudentID)
inner join Course as cs on (cs.CourseID = c.CourseID)

回答5:

select a.*,b.*,c.* from bookmessage a,booklendtable b,readermessage c, where a.id = b.bookcode and b.usercode=c.readernum and boorrowdate = to_date(to_char(sysdate,'yyyy-mm-dd'),'yyyy-mm-dd')

回答6:

各表的字段写清楚些,不知道你各表的都是什么字段