oracle項目部署維護最常用sql語句,oracle項目sql語句

來源:互聯網
上載者:User

oracle項目部署維護最常用sql語句,oracle項目sql語句

    大家好,這是小編我整理的 每次開發完項目到現場部署伺服器時最常用到的一些oracle資料庫sql語句,希望能幫到大家。


-- 建立資料資料表空間

create tablespace pssts
logging  
datafile 'D:\oracle\product\10.2.0\oradata\orcl\pssts.dbf' 
size 10m  
autoextend on  
next 10m maxsize 20480m  
extent management local;  

-- 建立使用者並指定資料表空間

create user pssts identified by pssts123 default tablespace pssts temporary tablespace temp; 


-- 為使用者授權

grant connect,dba to pssts ;

--匯入資料庫
imp pssts/pssts123@orcl fromuser=stpssts touser=pssts file=D:\log=D:\2.log     

--匯出資料庫   
          
exp pssts/pssts123@orcl  file=D:\pssts.dmp owner=pssts log=D:\pssts.log


-- 刪除使用者
drop user pssts  cascade;


-- 刪除資料表空間


drop tablespace pssts including contents and datafiles;
sql或者Oracle中怎使用一條語句更改兩種結果

使用DECODE來解決,也可以使用CASE WHEN 語句。
update class set sex=decode(status,'0','男','1','女');
或者
update class set sex=(case status='0' then '男' else '女' end );
 
超市系統維護員(常用SQL語句與常用DOS命令)

常用的SQL語句
資料定義:create table(建表)、drop table(刪表)、alter table(修改表定義)
資料操作:select(查詢)、insert into(增加)、update(修改)、delete(刪除)

sqlserver和oracle的基本sql語句是相同的,查詢、修改、建表這些語句可以通用。雖然這兩個系統的不同點也有很多,但對初學者來說區別不大,可以認為是標準SQL語言的兩個不同的方言。

常用的DOS命令
dir(列目錄)、cd(改變目錄)、md(建目錄)、rd(刪目錄)、del(刪檔案)、deltree(刪目錄和檔案)、copy(拷檔案)、xcopy(拷目錄)、move(移動檔案)、cls(清螢幕)、type(顯示檔案內容)、ren(改檔案名稱)、attrib(修改檔案屬性)、fc(檔案比較)、date(設定日期)、time(設定時間)、chkdsk(檢查磁碟)、fdisk(硬碟分區)、format(格式化分區)、ping(網路連通測試)、arp(顯示arp協議資訊)、route(設定路由資訊)、tracert(顯示路由跟蹤資訊)、ipconfig(顯示網路設定)、netstat(顯示網路狀態資訊)、ftp(登陸ftp伺服器)、telnet(登陸telnet伺服器)
 

相關文章

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.