Chinaunix首页 | 论坛 | 博客
  • 博客访问: 18681948
  • 博文数量: 7460
  • 博客积分: 10434
  • 博客等级: 上将
  • 技术积分: 78178
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-02 22:54
文章分类

全部博文(7460)

文章存档

2011年(1)

2009年(669)

2008年(6790)

分类: Mysql/postgreSQL

2008-05-30 16:57:51

还是先 Create table 吧
  
  create table emp(
  id int not null primary key,
  name varchar(10)
  );
  
  create table emp_dept(
  dept_id varchar(4) not null,
  emp_id int not null,
  emp_name varchar(10),
  primary key (dept_id,emp_id));
  
  insert into emp() values
  (1,"Dennis-1"),
  (2,"Dennis-2"),
  (3,"Dennis-3"),
  (4,"Dennis-4"),
  (5,"Dennis-5"),
  (6,"Dennis-6"),
  (7,"Dennis-7"),
  (8,"Dennis-8"),
  (9,"Dennis-9"),
  (10,"Dennis-10");
  
  insert into emp_dept() values
  ("R&D",1,"Dennis-1"),
  ("DEv",2,"Dennis-2"),
  ("R&D",3,"Dennis-3"),
  ("Test",4,"Dennis-4"),
  ("Test",5,"Dennis-5");
阅读(372) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~