在SQL*PLUS中如何创建oracle表

来源:百度知道 编辑:UC知道 时间:2024/07/01 13:32:07
如何创建
给个示例来看看

简单例子:
create table t_name1 (id int,name varchar2(20));
alter table t_name1 add constraits pk_t_name1 primary key(id);

详细语法讲解可以参考这里:
http://download.oracle.com/docs/cd/B14117_01/server.101/b10759/statements_7002.htm#sthref5384

表student:
create table student(
stuno number(4) not null,
stuname varchar(20) not null,
stubatch varchar(20) not null)
加约束:
alter table student
add constraits stu_stuno_pk primary key(stuno);