標籤:轉http://www.cnblogs.com/252e/archive/2012/09/13/2682817.html查詢及重複資料刪除記錄的SQL語句 1、尋找表中多餘的重複記錄,重複記錄是根據單個欄位(Id)來判斷 select * from 表 where Id in (select Id from 表 group byId having count(Id) >
標籤:PL/SOL(procedure language/SOL)是用於各種環境中訪問oracle資料庫的一種比較複雜的程式設計語言,與資料庫伺服器整合在一起。Oracle三層模型使用者介面(例如客戶瀏覽器) 應用邏輯層(例如應用程式伺服器) 資料庫儲存(Oracle資料庫伺服器)PL/SOL支援內建資料類型和使用者自訂資料類型使用者自訂類型DECLARE TYPE myrecord is RECORD (ID number(2),name varchar(2
標籤:oracle資料庫安裝注意點:orcl,安裝過程中指定sys,system等相關賬戶密碼scott賬戶下有常用的四張表,可用system或sys作為sysdba進去,可alter user scott account unlock解鎖scott賬戶,alter user scott identified by tiger設定新的密碼成功後,使用conn scott/
標籤:最近在做Oracle的項目,由於以前沒有接觸過Oracle的開發,遇到了不少的問題,比如給Oracle表添加自增列,與SQL Server就不同。 Oracle沒有自增欄位這樣的功能,但是通過觸發器(trigger)和序列(sequence)可以實現。先建一個測試表了:create table userlogin( id number(6) not null,
標籤:1.建立一個表類型tabletype: create or replace type tabletype as table of VARCHAR2(32676); 2.建立split 函數CREATE OR REPLACE FUNCTION split (p_list CLOB, p_sep VARCHAR2 := ‘,‘)RETURN tabletypePIPELINEDIS/* * 2015-11-11 * Function: 返回字串被指定字元分割後的表類型。*
標籤:2015-11-10查看錶空間總容量select tablespace_name, sum(bytes) / 1024 / 1024 as MB from dba_data_files group by tablespace_name;查看錶空間使用率SELECT a.tablespace_name,total,free, (total-free),total/(1024*1024*1024),free/(1024*1024*1024) "free(G)",(total-free)/(10
標籤:1. 內串連很簡單 select A.*, B.* from A,B where A.id = B.id select A.*, B.* from A inner join B on A.id = B.id 以上兩句是完全等價的 2. 左外串連 select * from emp a left join dept d on a.deptno=d.deptno select * from emp a,dept d where