Common orcle statements and orcle statements
-- 1. create temporary tablespace AUTOMONITORV5_temptempfile 'd: \ ORACLE \ KARL \ ORADATA \ ORCL \ automonitorv5_temp.dbf' size 50 m autoextend on next 50 m maxsize 10240 m extent management local; -- 2. create tablespace AUTOMONITORV5 logging datafile 'd: \ ORACLE \ KARL \ ORADATA \ ORCL \ AUTOMONITORV5.DBF 'size 50 m autoextend on next 50 m maxsize 12720 m extent management local; -- 3. create user automonitorv5 identified by "123456" default tablespace AUTOMONITORV5 temporary tablespace AUTOMONITORV5_temp; -- 4. grant connect, resource, dba to automonitorv5; -- 5. delete user drop user automonitorv5 cascade; -- 6. delete tablespace drop tablespace automonitorv5 including contents and datafiles; -- 7. select tablespace_name, file_id, file_name, round (bytes/(1024*1024), 0) total_space from dba_data_files order by tablespace_name; -- 8. table space usage SELECT. tablespace_name "tablespace name", total "tablespace size", free "tablespace remaining size", (total-free) "tablespace used size", Round (total-free)/total, 4) * 100 "usage %" FROM (SELECT tablespace_name, Sum (bytes) free FROM DBA_FREE_SPACE group by tablespace_name) a, (SELECT tablespace_name, Sum (bytes) total FROM DBA_DATA_FILES group by tablespace_name) B WHERE. tablespace_name = B. tablespace_name; -- 9. alter database datafile 'd: \ ORACLE \ KARL \ ORADATA \ ORCL \ automonitorv5.dbf' resize 4000 m; -- 10. add the number of files to alter tablespace AUTOMONITORV5 add datafile 'd: \ ORACLE \ KARL \ ORADATA \ ORCL \ automonitorv51.dbf' size 1000 m; -- 11. alter database datafile 'd: \ ORACLE \ KARL \ ORADATA \ ORCL \ automonitorv5.dbf' autoextend on next 100 m maxsize 10240 m;
Which of the following statements is the most common in oracle?
INSERT statement; insert into table [(column [, column])] VALUES (values [, values...]);
UPDATE statement: UPDATE table SET column = value [, column = vallue...] [WHERE condition];
DELETE statement: delete from table [WHERE comdition];
What are common oracle statements?
The simplest query is the select statement.
Database Operation Language DML: update, insert, delete, etc.
Database Definition Language DDL: create, drop, alter, etc.