From 8cef11dff416374fe16eef92c562419b18acb21a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Sun, 13 Nov 2022 18:58:39 +0100 Subject: [PATCH] Add DB notes. --- 2/ASGBD/notes/commands.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 2/ASGBD/notes/commands.txt diff --git a/2/ASGBD/notes/commands.txt b/2/ASGBD/notes/commands.txt new file mode 100644 index 0000000..0b622a5 --- /dev/null +++ b/2/ASGBD/notes/commands.txt @@ -0,0 +1,24 @@ +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; +CREATE TABLE table_name( + ... +) TABLESPACE tablespace_name;