乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      SQL簡單查詢

       杜橋伊人 2020-05-05

      1、查詢教師所有的單位即不重復的Depart列

      select distinct depart from teacher

      2、查詢Score表中成績在60到80之間的所有記錄

      select * from score where degree between 60 and 80

      3、查詢Score表中成績?yōu)?5,86或88的記錄

      select * from score where degree in (85,86,88)

      4、查詢Student表中“95031”班或性別為“女”的同學記錄

      select * from student where class='95031' or ssex ='女'

      5、以Cno升序、Degree降序查詢Score表的所有記錄

      select * from score order by cno,degree desc

      6、查詢“95031”班的學生人數(shù)

      select count(*) from student where class='95031'

      或者:select count(*) as scount from student where class='95031'  

      ---查詢結果另取列名 為scount 展示

      7、查詢Score表中的最高分的學生學號和課程號

      select sno,cno from score where degree=(select max(degree) from score) 

      8、查詢每門課的平均成績

      select cno,avg(degree) from score group by cno

      9、查詢Score表中至少有5名學生選修的并以3開頭的課程的平均分數(shù)

      select cno,avg(degree) from score group by cno having count(*)>=5 and cno like'3%'

      10、查詢所有學生的Sname、Cno和Degree列

      select sname,cno,degree from student,score

      where student.sno=score.sno

      或者:select sname,cno,degree from score join student on score.sno = student.sno

      11、查詢所有學生的Sname、Cname和Degree列

      select sname,cname,degree from student,course,score where student.sno = score.sno and score.cno=course.cno

      或者:select sname,cname,degree from score join student on student.sno=score.sno join course on score.cno = course.cno

        本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權內(nèi)容,請點擊一鍵舉報。
        轉藏 分享 獻花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多