Oracle --Pl/SQL
建立表空间:
create tablespace Panoramalogging
datafile 'E:/Panorama'
size 2048m
autoextend on
next 512m maxsize 5120m
extent management local;
新建用户:
create user Panorama identified by panorama
default tablespace Panorama;
授权:
grant all privileges to Panorama;
表中建立外键:CONSTRAINT PanoLevel_PanoScene foreign key(PID) references PanoScene(PID)
表外建立主键:alter table PanoLine add constraint pk_tab2 primary key (id1,id2);
表中建立复合主键:CONSTRAINT PanoLine PRIMARY KEY (LineID,FromSceneID,ToSceneID)