欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

SQL高级查询

程序员文章站 2024-03-05 18:27:55
...

SQL高级查询

SQL高级查询

三表内连接

    select s.sname,t.tname,b.subjectName from student s 
   
    inner join teacher t on(s.tid = t.tid)
   
    inner join subject b on(b.subjectNo = t.subjectNo);

in查询

select * from  students where sid in(select sid from result  where subjectNo=
(selcet form subject where subjectName ='HTML') 
and studentResult>60);

相关标签: Java学习周记