---
title: "初始表"
author: "tomfish88"
date: "2013-12-03T10:52:40Z"
tags: []
categories: ["数据库"]
slug: "untitled"
draft: false
lastmod: "2013-12-03T10:52:40Z"
id: 1984100
url: "https://tomfish88.iteye.com/blog/1984100"
---

```
DEPT
```

```
-- Create table
create table DEPT
(
  deptno NUMBER(2) not null,
  dname  VARCHAR2(14),
  loc    VARCHAR2(13)
)
tablespace USERS
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );
-- Create/Recreate primary, unique and foreign key constraints 
alter table DEPT
  add constraint PK_DEPT primary key (DEPTNO)
  using index 
  tablespace USERS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );
```