-- 1 查找出成绩表中所有学生的平均数 SELECT Sid,AVG(score) FROM sc GROUP BY Sid; -- 2.查找出平均分数 大于70 avg(score) > 70; SELECT Sid,AVG(score) AS avg FROM sc GROUP BY Sid ...
分类:
其他好文 时间:
2020-01-15 21:23:17
阅读次数:
1093
#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int N = 40005; //vector<vector<int>> const int M = 26*26*26*10 ...
分类:
编程语言 时间:
2020-01-15 19:33:02
阅读次数:
53
import pymysql # 数据库连接 def db_connect(): # 打开数据库连接 db = pymysql.connect('localhost', 'root', 'lms12100513.....', 'student') # 使用 cursor()方法创建一个游标对象 cu ...
分类:
数据库 时间:
2020-01-14 23:49:34
阅读次数:
106
public class Student { private int no; private String name; private int age; public Student(int no, String name, int age) { // 带参数的构造方法 this.name=name ...
分类:
编程语言 时间:
2020-01-13 16:08:30
阅读次数:
142
自定义排序:Comparator & Comparable Comparable 结合 TreeSet 使用 Student.java @Data @AllArgsConstructor public class Student implements Comparable<Student>{ pri ...
分类:
编程语言 时间:
2020-01-11 16:41:55
阅读次数:
85
题目来源:https://blog.csdn.net/flycat296/article/details/63681089 1. 查询" 01 "课程比" 02 "课程成绩高的学生的信息及课程分数 使用隐式 FROM student s3, ( SELECT s1.stu_id sid, s1.`s ...
分类:
数据库 时间:
2020-01-11 13:14:20
阅读次数:
189
一、定义 成员变量 成员方法 注意: 1、成员变量有默认值,是全局变量 2、成员方法,不需要使用static 3、成员变量的默认值 整型 0 浮点型 0.0 引用数据类型 null 二、使用 1、导包 2、实例化 3、使用 注意: 1、同一目录下的类不需要导包 2、实例化 类 对象 = new 类( ...
分类:
编程语言 时间:
2020-01-11 00:01:24
阅读次数:
99
一、IN 、NOT IN IN 操作符允许在 WHERE 子句中规定多个值。column_name中取值为value1 、value2....的数据会被筛选出来。 (1)in的两种应用场景 select name from student where name in('zhang','wang',' ...
分类:
数据库 时间:
2020-01-10 18:47:02
阅读次数:
76
Q:mybatis框架里$和#的区别? A: 1 #是将传入的值当做字符串的形式,eg:select id,name,age from student where id =#{id},当前端把id值1,传入到后台的时候,就相当于 select id,name,age from student whe ...
分类:
数据库 时间:
2020-01-10 12:53:16
阅读次数:
69
一、委托的概念 委托和类一样是一种用户自定义类型,它存储的就是一系列具有相同签名和返回类型的方法的地址,调用委托的时候,它所包含的所有方法都会被执行。 借用百度上的一句话概括:委托是一个类,它定义了方法的类型,使得可以将方法当作另一个方法的参数来进行传递,这种将方法动态地赋给参数的做法, 可以避免在 ...