ceu-notes/2/ASGBD/notes/commands.txt

40 lines
914 B
Plaintext
Raw Normal View History

2022-11-14 17:06:42 +00:00
ALTER SESSION SET "_ORACLE_SCRIPT" = true;
2022-11-13 17:58:39 +00:00
CREATE USER username
IDENTIFIED BY password
[DEFAULT TABLESPACE tablespace]
[QUOTA {size | UNLIMITED} ON tablespace]
[PROFILE profile]
[PASSWORD EXPIRE]
[ACCOUNT {LOCK | UNLOCK}];
CREATE INDEX index_name
ON table_name(column1[,column2,...]);
GRANT {system_privileges | object_privileges }
TO user
[WITH ADMIN OPTION];
REVOKE {system_privilege | object_privilege } FROM user;
CREATE TABLESPACE tbs1
DATAFILE 'tbs1.dbf'
SIZE 1m
AUTOEXTEND 20m;
2022-11-15 17:11:45 +00:00
2022-11-13 17:58:39 +00:00
CREATE TABLE table_name(
...
) TABLESPACE tablespace_name;
2022-11-15 17:11:45 +00:00
CREATE SEQUENCE schema_name.sequence_name
[INCREMENT BY interval]
[START WITH first_number]
[MAXVALUE max_value | NOMAXVALUE]
[MINVALUE min_value | NOMINVALUE]
[CYCLE | NOCYCLE]
[CACHE cache_size | NOCACHE]
[ORDER | NOORDER];
CREATE PROFILE profile_name
LIMIT { resource_parameters | password_parameters};