標籤:1.列轉換 1:每個字母轉成一行SELECT SUBSTR(A.COLUMN1, LEV, 1) COLUMN1FROM ( SELECT ‘AABDC‘ COLUMN1 FROM DUAL) A,(SELECT LEVEL LEV FROM DUAL CONNECT BY LEVEL<=100) BWHERE LEV <=
標籤:要求查詢每個使用者對應的最大樣品資訊,忽然想到ms sql提供過 row_number() over(partition by 列 order by 列 desc),那麼oracle可能也存在,我的表結構如下:create table NEOGOODSRULE( ID NUMBER(22) not null, PERSONALID NVARCHAR2(50), CT_SMP_TYPE NVARCHAR2(100))tablespace VGSM pctfree
標籤:使用者管理:1、建立使用者(要用dba許可權登入才能建立sys/system登入)create user 使用者名稱 identified by 密碼(密碼以字母開頭);2、給使用者修改密碼1>alter user 使用者名稱 identified by 新密碼;2>password 使用者名稱,然後提示你輸入新密碼3、刪除使用者drop user
標籤:update兩表關聯的寫法包括字查詢 1.update t2 set parentid=(select ownerid from t1 where t1.id=t2.id); 2. update tb_client_win_lost_report a set a.rolling_code_id=2 where game_code_id=70000 and exists (select ‘x‘ from (select
標籤:select * from teacher--聯集查詢 --01.union (並集)select tno from teacher where tno>1080 union(select tno from teacher where tno>1090)--02.union all(並集並且顯示重複的資料)select tno from teacher where tno>1080 union all(select tno from teacher where
標籤:概念:所謂序列,在oracle中就是一個對象,這個對象用來提供一個有序的資料列,這個有序的資料列的值都不重複。 1.序列可以自動產生唯一值2.是一個可以被共用的對象3.典型的用來產生主索引值的一個對象4.可以替代應用程式代碼5.當sequence的值存放在緩衝中時可以提高訪問效率。 建立序列文法:CREATE SEQUENCE name[INCREMENT BY n][START WITH n] &