学习了MySQL第一小节,回家后上机试试~ Read More
posted @ 2013-05-15 09:34 瑾 梦 Views(74) Comments(0) Diggs(0)
mysql>select * from student;mysql>select *from student where id=901;mysql>select * from student where id in(903,910);mysql>select * from student where name like "张三";mysql>select distinct sex from student;mysql>select * from student order by birth; Read More
posted @ 2013-04-10 15:11 瑾 梦 Views(119) Comments(0) Diggs(0)
今天是工作一周年的日子啦,回顾这一年里,除了工作用到的东西,自己学习的东西少之又少。。每天都是一个新的开始,就算只有一点点进步,也别放弃!Mysql和Linux!两者学习中。。。 Read More
posted @ 2013-04-10 14:54 瑾 梦 Views(95) Comments(0) Diggs(0)
---恢复内容开始---Index classfication 索引分类1.General index 普通索引 mysql>create table index1( >id int, >name varchar(25), >sex boolean, >index(id) >);2 Unique index唯一性索引 mysql>create table index2( >id int unique, >name varchar(20), >unique index index2_id(id ASC) >);3.... Read More
posted @ 2013-04-03 14:19 瑾 梦 Views(203) Comments(0) Diggs(0)
mysql>alter table student rename person; 修改表的名字mysql>alter table person name varchar(20);修改字段的数据类型,name为字段mysql>alter table change stu_name name varchar(20);修改字段的名字mysql>alter table person add sex boolean;添加无完整性约束条件的字段mysql>alter table person add age int not null;添加有完整性约束条件的字段 Read More
posted @ 2013-04-02 11:04 瑾 梦 Views(111) Comments(0) Diggs(0)
Intergrity ConstraitsSet table's foreign keypurpose:establish links with the parent table(建立于父表的联系) mysql>create table student3( >id int primary key, >course_id int, >teacher varchar(20), >constraint fk foreign key(id.course_id) >references student2(id,course_id) >); Set tab Read More
posted @ 2013-03-29 15:24 瑾 梦 Views(117) Comments(0) Diggs(0)
Intergrity Constrait (完整性约束)Set table key‘s primary key mysql>create table student( >id int primary key, >name varchar(40), >sex boolean, >); Multiple-field primary key---consists of more than one property mysql>create table student2( >id int, >course_id int, >score f... Read More
posted @ 2013-03-29 15:00 瑾 梦 Views(97) Comments(0) Diggs(0)
login: mysql -u root -p mysql -h xxxx -u root -pcreate database: mysgl>create database cat; mysql>show database cat;delete database: mysql>drop database cat;table basics: 1.choose a database mysql>use cat; mysql>create table workers( > id int; >name varchar(10); ... Read More
posted @ 2013-03-28 14:28 瑾 梦 Views(219) Comments(0) Diggs(0)
今天是3月28号了哦,开始我的MySQL和Linux学习之旅了哦 Read More
posted @ 2013-03-28 11:07 瑾 梦 Views(108) Comments(0) Diggs(0)