|  
  #su - Oracle  
$ sqlplus /nolog  
SQL> connect / as sysdba  
--//創(chuàng)建臨時(shí)表空間  
create temporary tablespace test_temp  
tempfile '/data/Oracle/oradata/test/test_temp01.dbf' --//Linux下的文件系統(tǒng) - 
  
size 64m  
autoextend on  
next 64m maxsize 2048m  
extent management local; --//創(chuàng)建數(shù)據(jù)表空間  
create tablespace test_data  
logging  
datafile '/data/Oracle/oradata/test/test_data01.dbf' --//Linux下的文件系統(tǒng)  
size 64m  
autoextend on  
next 65m maxsize 2048m  
extent management local; --//創(chuàng)建用戶并指定表空間 用戶名和密碼均為"test"  
create user test identified by test  
default tablespace test_data  
temporary tablespace test_temp;  
--//給用戶授予權(quán)限 grant connect,resource to test; --//刪除表空間  
drop tablespace test_temp including CONTENTS and datafiles; --//修改用戶密碼  
alter user test identified by new_password; --//刪除用戶  
drop user 用戶名 cascade; --//執(zhí)行該語句請(qǐng)小心,會(huì)級(jí)聯(lián)刪除該用戶下所有對(duì)象。  
--//給用戶分配權(quán)限 SQL> grand connect to test_user;  
SQL> grand resource to test_user;  
SQL> grand create view to test_user; 
建好表后插入數(shù)據(jù) 查詢數(shù)據(jù) 要對(duì)該表加上引號(hào) 如: “表名”  本文出自:億恩科技【www.cmtents.com】 
      
      
		服務(wù)器租用/服務(wù)器托管中國五強(qiáng)!虛擬主機(jī)域名注冊(cè)頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM] 
       |