zoukankan      html  css  js  c++  java
  • 数据库作业,......修删改查

    select sname, ssex,sclass from student;
    

      

    --查询教师所有的单位即不重复的Depart列。
    select  distinct  depart from teacher;
    

      

    -- 查询Student表的所有记录。
    select * from student;
    

      

    --查询Score表中成绩在60到80之间的所有记录。
    select *from score s where s. degree>=60 and s.degree<=80;
    

      

    --查询成绩是85  86 88 的
    select * from score s where s.degree=85 or s.degree=86 or s.degree=88;
    

      

    --查询Student表中“95031”班或性别为“女”的同学记录。
    select *from student s where s.sclass='95031'or s.ssex='女';
    

      

    --以Class降序查询Student表的所有记录
    select * from student  order by sclass desc;
    

      

    -- 以Cno升序、Degree降序查询Score表的所有记录。
    select * from score s order by s. cno , s.degree desc;
    

      

    --建表,并添加数据
    select * from score s order by s. cno , s.degree desc;
    
    create table grade(low  number(3),upp  number (3),rank  char(1));
    insert into grade values(90,100,'A');
    insert into grade values(80,89,'B');
    insert into grade values(70,79,'C');
    insert into grade values(60,69,'D');
    insert into grade values(0,59,'E');
    

      

     

  • 相关阅读:
    洛谷—— P3353 在你窗外闪耀的星星
    洛谷—— P1238 走迷宫
    洛谷—— P1262 间谍网络
    9.8——模拟赛
    洛谷—— P1189 SEARCH
    算法
    May 22nd 2017 Week 21st Monday
    May 21st 2017 Week 21st Sunday
    May 20th 2017 Week 20th Saturday
    May 19th 2017 Week 20th Friday
  • 原文地址:https://www.cnblogs.com/liuyanzeng/p/5950367.html
Copyright © 2011-2022 走看看