MYSQL
chengxuya
我不甘心,从来都是,既然如此,一往无前。
展开
-
SQL语句
1.复制表create table if not exists actor_name(first_name varchar(45) not null,last_name varchar(45) not null); -- 创建表insert into actor_nameselect first_name,last_namefrom actor; -- 插入查询结果原创 2020-10-28 02:29:42 · 78 阅读 · 0 评论 -
数据库知识总结(有部分修改):
一、基本概念1.主键、外键、超键、候选键超键:在关系中能唯一标识元组的属性集称为关系模式的超键。一个属性可以为作为一个超键,多个属性组合在一起也可以作为一个超键。超键包含候选键和主键。候选键:是最小超键,即没有冗余元素的超键。主键:数据库表中对储存数据对象予以唯一和完整标识的数据列或属性的组合。一个数据列只能有一个主键,且主键的取值不能缺失,即不能为空值(Null)。外键:在一个表中存在的另一个表的主键称此表的外键。2.为什么用自增列作为主键如果我们定义了主键(PRIMAR转载 2020-10-15 13:43:03 · 1753 阅读 · 1 评论 -
数据库理论学习内容
1.总的:https://www.nowcoder.com/discuss/135748https://www.nowcoder.com/discuss/494464?type=2&channel=1009&source_id=discuss_terminal_discuss_jinghua2.索引:https://www.yisu.com/zixun/144710.htmlhttps://blog.csdn.net/lc0817/article/details/5275原创 2020-10-05 11:25:35 · 228 阅读 · 1 评论