友情链接1:21点 足球投注 投注网 明升体育 hg0088 葡京赌场 网上赌球 诈金花 澳门金沙网址 澳门银河网址 澳门银河 澳门银河官网 银河官网 威尼斯人 澳门威尼斯人 澳门威尼斯人官网 威尼斯人官网 金沙 澳门金沙 澳门金沙官网 金沙官网 现金网 赌球网 全讯网 明升国际 足球开户 ******官网 ******网址 现金赌博 澳门现金网 ******官方网站

Oracle | Mingo's Blog
鏃ュ織鍒嗙被锛歄racle

鏃犻渶瀹夎Oracle锛岀敤PL/SQL鐩存帴杩炴帴Oracle鏈嶅姟鍣

鏃堕棿锛2013骞01鏈26鏃浣滆咃細Mingo琚洿瑙備簡锛3,818 娆璇勮娆℃暟锛0

鐢≒L/SQL杩炴帴Oracle鐨勬椂鍊欙紝娌℃湁蹇呰瀹夎Oracle鏈嶅姟鍣紝鍙瀹夎涓涓狾racle瀹㈡埛绔紝鐒跺悗浣跨敤缁胯壊鐗圥L/SQL杩炴帴灏卞彲浠ヤ簡銆傚叿浣撴搷浣滃涓嬶細

1銆佷笅杞絆racle瀹㈡埛绔http://pan.baidu.com/share/link?shareid=206463&uk=1879843906锛屼笅杞戒互鍚庤В鍘媜racle9.zip,

鐒跺悗杩愯閲岄潰鐨 鈥滃畨瑁.cmd鈥濇枃浠躲

2銆佺劧鍚庢墦寮 NETWORK \ ADMIN\tnsnames.ora 鏂囦欢锛屾寜鐓т互涓嬫牸寮忚繘琛岄厤缃

ClientName = (DESCRIPTION = 聽聽聽 (ADDRESS_LIST = 聽聽聽聽聽聽聽聽 (ADDRESS = (PROTOCOL = TCP)(HOST = 鏈嶅姟鍣↖P)(PORT = 杩炴帴绔彛)) 聽聽聽聽 ) 聽聽聽 (CONNECT_DATA = 聽聽聽聽聽聽 (SERVICE_NAME = ORACLEDB(鏈嶅姟鍣⊿ID)) 聽聽聽 ) )

3銆佷笅杞界豢鑹茬増PL/SQL http://pan.baidu.com/share/link?shareid=206477&uk=1879843906

4銆佽繍琛孭L/SQL锛屽啀閫夋嫨鑿滃崟涓殑 宸ュ叿->棣栭夐」->鎵惧埌Oracle涓荤洰褰曞悕锛岄噷闈㈣缃负%OracleClient%锛汷CI搴撲负%OracleClient%\oci.dll銆

5銆侀噸鏂板惎鍔≒L/SQL銆

鍒嗙被锛Oracle, PL/SQL

濡備綍鍐欏嚭鑹ソ鐨凷QL璇彞锛

鏃堕棿锛2012骞04鏈13鏃浣滆咃細Mingo琚洿瑙備簡锛4,856 娆璇勮娆℃暟锛0

1銆佸浜庤妯¤緝灏忕殑琛紝濡傛灉SQL璇彞鐨刉HERE瀛楀彞鏈 GROUP BY銆丏ISTINCT鎴朞RDER BY锛屽垯瀵规秹鍙婄殑鍒楀缓绔嬫槑纭殑绱㈠紩銆

2銆佸鏋淪QL 璇彞鐨刉HERE瀛楀彞鍦ㄤ娇鐢ㄧ储寮曟椂姣旀墽琛屽叏琛ㄦ壂鎻忚繕瑕佽楁椂锛屽垯涓嶅疄鐢ㄧ储寮曘

3銆佸湪搴旂敤绋嬪簭鐨凷QL璇彞涓笉瑕佷娇鐢ㄧ浉鍏冲瓙鏌ヨ锛屽洜涓洪殢鐫瀛愭煡璇㈠拰涓绘煡璇腑琛ㄥ唴琛岃褰曠殑澧為暱锛岃繖绉嶆煡璇㈠皢鏋佸ぇ鐨勬秷鑰桟PU璧勬簮锛岃屽敖閲忎娇鐢ㄨ仈鏈鸿鍥鹃噸鏂扮紪鍐欍

4銆佸湪SQL璇彞鐨刉HERE瀛楀彞涓敤not exists鏉ヤ唬鏇縩ot in銆

5銆佷娇鐢╨ike杩愮畻绗︿唬鏇縮ubstr鍑芥暟锛屽洜涓簂ike杩愮畻绗﹀皢浣跨敤绱㈠紩锛岃宻ubstr鍑芥暟浣跨敤绱㈠紩鏃犳晥銆

6銆佸鏋淪QL璇彞涓绻佷娇鐢ㄥ熀浜庢煇绉嶈绠楄鍒欑殑鏌ヨ锛屽苟涓旂煡閬撴墍娑夊強鐨勫垪锛屽垯鍒涘缓鍩轰簬鍑芥暟鐨勭储寮曘

7銆佸鏋滄煡璇㈡绘槸鍩轰簬涓讳粠琛ㄧ殑琛岋紝鍒欏澶栭敭寤虹珛绱㈠紩銆

8銆佸敖閲忓噺灏戝缓绔嬬储寮曠殑鏃堕棿锛屽彲浠ュ皢sort_area_size璁剧疆鐨勮冻澶熷ぇ锛屼娇寰楀缓绔嬬储寮曠殑鎺掑簭琛屼负閮藉湪鍐呭瓨涓彂鐢燂紝鎴栬呭湪绯荤粺涓嶇箒蹇欐椂鍒涘缓澶ц〃鐨勭储寮曘

鏍囩锛,鍒嗙被锛Oracle, 鏁版嵁搴

瑙e喅PL/SQL涓嚭鐜???涔辩爜鐨勯棶棰

鏃堕棿锛2012骞03鏈14鏃浣滆咃細Mingo琚洿瑙備簡锛6,169 娆璇勮娆℃暟锛1

鐢≒L/SQL 杩炴帴鏈嶅姟鍣ㄤ笂鐨勬暟鎹簱锛屼笉鏄湰鏈篛racle

璁剧疆绯荤粺鐜鍙橀噺锛屽彉閲忓悕锛歂LS_LANG锛屽彉閲忓间负浠ヤ笅鐨勬煡璇㈢粨鏋溿

SELECT ‘AMERICAN_AMERICA.’ || PROPERTY_VALUE
FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME = ‘NLS_CHARACTERSET’;

璁剧疆濂藉悗閲嶅惎鐢佃剳锛圵in7/2008鍙互涓嶇敤閲嶅惎锛

鏍囩锛鍒嗙被锛Oracle, PL/SQL

Oracle 鎭㈠ oradata 閲岄潰鐨勬暟鎹

鏃堕棿锛2012骞03鏈07鏃浣滆咃細Mingo琚洿瑙備簡锛4,421 娆璇勮娆℃暟锛0

鏈夋椂鍊欎細閬囧埌Oracle鏁版嵁搴撳穿婧冧簡锛岃屾暟鎹張娌℃湁澶囦唤锛屾庝箞鍔烇紵

娌″叧绯伙紝鍙浣犵殑 oradata鐩綍杩樺湪锛屽氨鏈夋満浼氬洖澶嶆暟鎹紝姝ラ濡備笅锛

1銆佹妸oradata鐩綍涓嬬殑鏂囦欢澶囦唤锛堝喎澶囦唤锛

2銆佸畨瑁匫racle鏁版嵁搴擄紝SID鍚嶇О銆佽矾寰勫繀椤诲拰鍘熸潵鐨勪竴鏍枫

3銆佷互sys鐧诲綍sqlplus锛宻hutdown immediate鍏抽棴鏁版嵁搴撶▼搴忥紝鐢ㄥ浠界殑oradata鎶婂缓绔嬬殑瀹炰緥瑕嗙洊銆

=======================CMD鎿嶄綔濡備笅========================

Microsoft Windows [鐗堟湰 5.2.3790]
(C) 鐗堟潈鎵鏈 1985-2003 Microsoft Corp.

C:\Documents and Settings\Administrator>cd\
C:\>sqlplus /nolog

SQL*Plus: Release 9.2.0.1.0 - Production on 鏄熸湡浜 5鏈 18 12:58:26 2010
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> conn system/system as sysdba
宸茶繛鎺ャ
SQL> shutdown immediate
宸茬粡鍗歌浇鏁版嵁搴撱
ORACLE 渚嬬▼宸茬粡鍏抽棴銆

 

杩欎釜鏃跺欑敤澶囦唤鐨刼radata鎶婃柊寤虹珛鐨勫疄渚嬭鐩

SQL> startup
ORACLE 渚嬬▼宸茬粡鍚姩銆

Total System Global Area 135338868 bytes
Fixed Size 453492 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
ORA-01991: ???????'D:\oracle\ora92\DATABASE\PWDoracle.ORA'

SQL> host del D:\oracle\ora92\database\PWDoracle.ORA
SQL> host orapwd file=D:\oracle\ora92\DATABASE\PWDoracle.ORA password=system entries=10
SQL> alter database open;
鏁版嵁搴撳凡鏇存敼銆

SQL> conn system/system as sysdba
宸茶繛鎺ャ

SQL> shutdown immediate

鏁版嵁搴撳凡缁忓叧闂
宸茬粡鍗歌浇鏁版嵁搴撱

ORACLE 渚嬬▼宸茬粡鍏抽棴銆
SQL> startup

ORACLE 渚嬬▼宸茬粡鍚姩銆
Total System Global Area 135338868 bytes
Fixed Size 453492 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes

鏁版嵁搴撹杞藉畬姣曘
鏁版嵁搴撳凡缁忔墦寮銆

===========================CMD缁撴潫=============================聽

 

鏍囩锛,鍒嗙被锛Oracle, 鏁版嵁搴

Oracle涓疄鐜拌嚜鍔ㄥ闀垮垪

鏃堕棿锛2012骞03鏈07鏃浣滆咃細Mingo琚洿瑙備簡锛2,452 娆璇勮娆℃暟锛0

鎴戜滑鍦ㄤ娇鐢ㄦ暟鎹簱淇濆瓨鏁版嵁鐨勬椂鍊欙紝閫氬父浼氱敤鍒拌嚜澧為暱鍒楋紝鍍廠QLServer杩欐牱鐨勬暟鎹簱鏈夎嚜甯︾殑鑷闀垮垪锛岃孫racle骞舵病鏈夋彁渚涚洿鎺ュ疄鐜拌嚜澧為暱鐨勬柟娉曘備笉杩囨垜浠彲浠ヨ嚜宸辨潵瀹炵幇銆
姝ラ涓锛氬垱寤哄簭鍒

– CREATE SEQUENCE聽聽聽聽
CREATE SEQUENCE INNERID聽聽
MINVALUE 1聽聽
MAXVALUE 99999999999999聽聽
START WITH 1聽聽
INCREMENT BY 1聽聽
CACHE 20聽聽
ORDER;聽聽


姝ラ浜岋細鍒涘缓琛

CREATE TABLE ADMIN
(ID VARCHAR2(20),NAME VARCHAR2(10));


姝ラ涓夛細鍦ˋDMIN琛ㄤ笂鍒涘缓瑙﹀彂鍣

–ADMIN ID 鐨勮Е鍙戝櫒聽聽
CREATE OR REPLACE TRIGGER ADMIN_TG聽聽
BEFORE INSERT ON ADMIN FOR EACH ROW聽聽
BEGIN聽
SELECT INNERID.NEXTVAL INTO :NEW.ID FROM DUAL;聽聽
END;聽


姝ラ鍥涳細鎻掑叆鏁版嵁

INSERT INTO ADMIN (NAME) VALUES ( ‘zhangsan’);

鏍囩锛鍒嗙被锛Oracle, 鏁版嵁搴