
mysql
文章平均质量分 55
u010585120
这个作者很懒,什么都没留下…
展开
-
Oracle主键自增的解决办法
首先,要创建一个表 create table userinfo ( userid int not null primary key, username varchar(20) not null, password varchar(20) not null, sex varchar(4), age int ) 然后,创建原创 2015-04-05 22:12:16 · 552 阅读 · 0 评论 -
mysql update不能直接使用select的结果
在sql server中,我们可是使用以下update语句对表进行更新: update a set a.xx= (select yy from b) ; 但是在mysql中,不能直接使用set select的结果,必须使用inner join: update a inner join (select yy from b) c set a.xx = c.yyupdate不能直接使用select原创 2016-04-25 10:53:37 · 1541 阅读 · 0 评论 -
数据库设计三范式
为了建立冗余较小、结构合理的数据库,设计数据库时必须遵循一定的规则。在关系型数据库中这种规则就称为范式。范式是符合某一种设计要求的总结。要想设计一个结构合理的关系型数据库,必须满足一定的范式。 在实际开发中最为常见的设计范式有三个: 1.第一范式(确保每列保持原子性) 第一范式是最基本的范式。如果数据库表中的所有字段值都是不可分解的原子值转载 2016-06-27 11:01:35 · 377 阅读 · 0 评论