摘要: dept 表id name1 行政部2 财务部3 人事部4 销售部emp表id name dept_id(外键)1 芙蓉姐姐 12 犀利哥 23 春哥 34 曾哥 3部门和员工是 1对多的关系外键约束: ... 阅读全文
posted @ 2015-03-22 22:13 superPerfect 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 备份数据库表中的数据 cmd > mysqldump -u用户名 -p密码 数据库名>文件名.sql mysqldump -uroot -proot mydb1>c:/mydb2.sql 恢复数据 方式1.create database mydb2; mysql -ur... 阅读全文
posted @ 2015-03-22 10:06 superPerfect 阅读(157) 评论(0) 推荐(0) 编辑
摘要: INSERT insert into employee (id,name,gender,birthday,entry_date,job,salary,resume) values (null, '张飞',1,'1989-08-27','2007-08-27','打手',998.0,'真的... 阅读全文
posted @ 2015-03-22 09:38 superPerfect 阅读(303) 评论(0) 推荐(0) 编辑
摘要: mysql –u用户名 –p密码1.操作数据库 创建数据库 CREATE DATABASE [IF NOT EXISTS] db_name [create_specification [, create_specification] ...] create_specification: [D... 阅读全文
posted @ 2015-03-22 09:37 superPerfect 阅读(160) 评论(0) 推荐(0) 编辑