orcle常用語句,orcle語句

來源:互聯網
上載者:User

orcle常用語句,orcle語句

--1.建立暫存資料表空間create temporary tablespace AUTOMONITORV5_temptempfile 'D:\ORACLE\KARL\ORADATA\ORCL\AUTOMONITORV5_temp.DBF'  size 50m    autoextend on   next 50m maxsize 10240m   extent management local; --2.建立資料表空間create tablespace AUTOMONITORV5   logging   datafile 'D:\ORACLE\KARL\ORADATA\ORCL\AUTOMONITORV5.DBF'  size 50m   autoextend on   next 50m maxsize 12720m   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.刪除使用者drop user automonitorv5 cascade;--6.刪除資料表空間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.資料表空間使用率SELECT a.tablespace_name "資料表空間名",       total "資料表空間大小",       free "資料表空間剩餘大小",       (total - free) "資料表空間使用大小",       Round((total - free) / total, 4) * 100 "使用率   %"  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 a.tablespace_name = b.tablespace_name; --9.增大資料表空間大小alter database datafile 'D:\ORACLE\KARL\ORADATA\ORCL\AUTOMONITORV5.DBF' resize 4000m;--10.增加檔案個數alter tablespace AUTOMONITORV5     add datafile 'D:\ORACLE\KARL\ORADATA\ORCL\AUTOMONITORV51.DBF' size 1000m;     --11.設定資料表空間自動成長alter database datafile 'D:\ORACLE\KARL\ORADATA\ORCL\AUTOMONITORV5.DBF'      autoextend on next 100m maxsize 10240m;


oracle最常用的語句,或關鍵總結?

INSERT語句;INSERT INTO table [(column [,column]) ] VALUES (values [,values..]);
UPDATE語句:UPDATE table SET column=value[,column=vallue...] [WHERE condition];
DELETE語句:DELETE FROM table [WHERE comdition];
 
oracle常用的語句有什?

最簡單的就是查詢:select語句
資料庫操作語言DML:update、insert、delete等
資料庫定義語言DDL:create、drop、alter等等
 

相關文章

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.