- select t.stuid,
- t.courseid,
- t.score,
- b.stuname,
- b.sex,
- b.age,
- b.classno,
- b.grade
- from score t, stuinfo b
- where t.stuid = b.stuid
- and t.courseid = 'R20180101'
- and t.score = '85'
- --利用逻辑运算符or 和条件"=" 查询
- select t.stuid,
- t.courseid,
- t.score,
- b.stuname,
- b.sex,
- b.age,
- b.classno,
- b.grade
- from score t, stuinfo b
- where t.stuid = b.stuid
- and t.courseid = 'R20180101'
- and (t.score = '85' or t.score ='89' or t.score ='79');
- -- 利用Oracle操作符”IN“查询
- select t.stuid,
- t.courseid,
- t.score,
- b.stuname,
- b.sex,
- b.age,
- b.classno,
- b.grade
- from score t, stuinfo b
- where t.stuid = b.stuid
- and t.courseid = 'R20180101'
- and t.score in ('85','89','79');
- select t.stuid,
- t.courseid,
- t.score,
- b.stuname,
- b.sex,
- b.age,
- b.classno,
- b.grade
- from score t, stuinfo b
- where t.stuid = b.stuid
- and t.courseid = 'R20180101'
- and t.score between '70' and '95'
- select * from STUINFO t where t.stuname like '张%';