摘要: *IFNULL IFNULL(column,value) 如果column对应的值为null,value可为设置的返回值给该列 *条件查询 select column from 表名 where 条件表达式 条件运算符: < ,>,<>(!=),>=,<= 逻辑运算符:and ,or ,not 模糊 阅读全文
posted @ 2019-08-06 23:00 Be_your_own_hero 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 1:查看mysql版本 select version() 2:退出msql exit 3:msyql语法规范 *不区分大小写 *每条命令用分号结尾 *每条命令都可以缩进或换行 4:基础查询 查询单个字段 select column from 表名 查询多个字段 select column1,colu 阅读全文
posted @ 2019-08-06 22:09 Be_your_own_hero 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 1:登录mysql msyql -u root - p root 2:登录mysql后要查看msyql中有多少数据库 show databases; msyql (用来存放用户信息) 3: 进入到特定的数据库里面 use mysql; 4:进入数据库里面可以查看有什么表 show tables; 5 阅读全文
posted @ 2019-08-06 19:46 Be_your_own_hero 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 1:学生表 2:成绩表 1.查询所有学生的数学成绩,显示学生姓名name, 分数, 由高到低select s.name,g.kemu,g.score from student s,grade g where s.id=g.id and g.kemu="数学" order by g.score des 阅读全文
posted @ 2019-08-06 15:00 Be_your_own_hero 阅读(117) 评论(0) 推荐(0) 编辑