oracle 创建表空间、表、主键、外键、序列--创建表空间
create tablespace projects
datafile 'D:\projects.dbf'
size 10m autoextend on;
--创建用户名
create user proj
identified by proj
default tablespace projects;
--分配系统权限和角色
grant connect to proj;
--创键表和其它对象
grant resource to proj;
grant dba to proj;
--连接该用户
connect proj/proj;
--创建序列
create sequence U_seq
minvalue 1
maxvalue 10000
start with 1
increment by 1
cache 20;
--创建表
create table Users
(
Id varchar2(10) not null primary key,
uName varchar2(20) not null,
uPwd varchar2(10) not null,
uSex varchar2(10) not null,
uEmail varchar2(20) not null,
uLike varchar2(20)