随笔分类 - mysql
摘要:Student(SID, Sname, Sage, Ssex) 学生表 Course(CID, Cname, TID) 课程表 SC(SID, CID, score) 成绩表 Teacher(TID, Tname) 教师表 <Student学生表> SID Sname Sage <Student学生
阅读全文
摘要:高级查询基本用法 一、exists和notexists子查询 1、exists子查询 select 。。。。from 表名 where exists(子查询); 2、not exsits 子查询 select 。。。。from 表名 where not exists(子查询); 二、子查询的注意事项
阅读全文
摘要:高级查询基本用法 一、exists和notexists子查询 1、exists子查询 select 。。。。from 表名 where exists(子查询); 2、not exsits 子查询 select 。。。。from 表名 where not exists(子查询); 二、子查询的注意事项
阅读全文
摘要:一、什么是sql? 全称:“结构化查询语言(Structured Query Language)”,是1974年由Boyce和Chamberlin提出来的,现已经成为关系数据库的标准语言。 组成:DDL数据定义语言,用来建立数据库,数据库对象,和定义其列,大部分是以create开头的命令。 DQL:
阅读全文
摘要:初始Mysql 一、DDL(数据库定义语言) 创建数据库: create database 数据库名 charset utf8; 查看当前有哪些数据库: show databases; 创建表名: create table 表名(字段名 类型) charset utf8; 修改表名: alter t
阅读全文