Common orcle statements and orcle statements

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.