| 订阅 | 在线投稿
分享
 
 
当前位置: 王朝网络 >> oracle >> jie du ORACLE shu ju ku de tong yi ming ming yu bian ma gui fan
 

jie du ORACLE shu ju ku de tong yi ming ming yu bian ma gui fan

2008-10-24 08:27:33 编辑來源:互联网 评论
 
本文为【解读ORACLE数据库的统一命名与编码规范】的拼音翻译版
  1、 bian xie mu de
  shi yong tong yi de ming ming he bian ma gui fan , shi shu ju ku ming ming ji bian ma feng ge biao zhun hua , yi bian yu yue du 、 li jie he ji cheng 。
  2、 shi yong fan wei
  ben gui fan shi yong yu gong si fan wei nei suo you yi ORACLE zuo wei hou tai shu ju ku de ying yong xi tong he xiang mu kai fa gong zuo 。
  3、 dui xiang ming ming gui fan
  3.1 shu ju ku he SID
  shu ju ku ming ding yi wei xi tong ming + mo kuai ming
  ★ quan ju shu ju ku ming he li cheng SID ming yao qiu yi zhi
  ★ yin SID ming zhi neng bao han zi fu he shu zi , suo yi quan ju shu ju ku ming he SID ming zhong bu neng han you “_” deng zi fu
  3.2 biao xiang guan
  3.2.1 biao kong jian
  ★ mian xiang yong hu de zhuan yong shu ju biao kong jian yi yong hu ming +_+data ming ming , ru Aud yong hu zhuan yong shu ju biao kong jian ke ming ming wei Aud_data
  ★ mian xiang yong hu de zhuan yong suo yin biao kong jian yi yong hu ming +_+idx ming ming
  ★ mian xiang yong hu de zhuan yong lin shi biao kong jian yi yong hu ming +_+tmp ming ming
  ★ mian xiang yong hu de zhuan yong hui gun duan biao kong jian yi yong hu ming +_+rbs ming ming
  ★ mian xiang ying yong de biao kong jian yi ying yong ming +_data/ ying yong ming +_idx/ ying yong ming +_tmp/ ying yong ming +_rbs ming ming
  ★ LOB duan shu ju zhuan yong biao kong jian yi qi shu ju biao kong jian +_+lobs ming ming , ru shang li zhong shu ju biao kong jian wei Aud_data, ze LOB duan biao kong jian ke ming ming wei Aud_data_lobs
  3.2.2 biao kong jian wen jian
  biao kong jian wen jian ming ming yi biao kong jian ming + liang wei shu xu hao ( xu hao cong 01 kai shi ) zu cheng , ru Aud_data01 deng
  3.2.3 biao
  biao ming ming yao zun xun yi xia yuan ze :
  ★ yi ban biao cai yong “ xi tong ming +t_+ mo kuai ming +_+ biao yi ming ” ge shi gou cheng
  ★ ruo shu ju ku zhong zhi han you dan ge mo kuai , ming ming ke cai yong “ xi tong ming +t_+ biao yi ming ” ge shi gou cheng
  ★ mo kuai ming huo biao yi ming yun yi qi han yu pin yin de shou zi fu ming ming , biao yi ming zhong han yu pin yin yun cai yong xiao xie , qie zi fu jian bu jia fen ge fu ;
  ★ biao bie ming ming ming gui ze : qu biao yi ming de qian 3 ge zi fu jia zui hou yi ge zi fu 。 ru guo cun zai chong tu , shi dang zeng jia zi fu ( ru qu biao yi ming de qian 4 ge zi fu jia zui hou yi ge zi fu deng )
  ★ lin shi biao cai yong “ xi tong ming +t_tmp_+ biao yi ming ” ge shi gou cheng
  ★ biao de ming ming ru
  dft_gy_cbap: xi tong ming ( dian fei df)+t_+ mo kuai ming ( gao ya gy)+_+ biao yi ming ( chao biao an pai cbap)
  dft_cbbj: xi tong ming ( dian fei df)+t_+ biao yi ming ( chao biao biao ji cbbj)
  dft_tmp_hj: xi tong ming ( dian fei df)+tmp+ biao yi ming ( he ji hj)( ci chu wei lin shi biao )
  
  ★ guan lian biao ming ming wei Re_ biao A_ biao B,Re shi Relative de suo xie , biao A he biao B yun cai yong qi biao yi ming huo suo xie xing shi 。
  3.2.4 shu xing ( lie huo zi duan )
  shu xing ming ming zun xun yi xia yuan ze :
  ★ cai yong you yi yi de lie ming , wei shi ji han yi de han yu pin yin de shou zi fu , qie zi fu jian bu jia ren he fen ge fu
  ★ shu xing ming qian bu yao jia biao ming deng zuo wei qian zhui
  ★ shu xing hou bu jia ren he lei xing biao shi zuo wei hou zhui
  ★ bu yao shi yong “ID” zuo wei lie ming
  ★ guan lian zi duan ming ming yi “cd+_+ guan lian biao de biao yi ming ( huo suo xie )+_+ zi duan ming ” jin xing
  3.2.5 zhu jian
  ★ ren he biao dou bi xu ding yi zhu jian
  ★ biao zhu jian ming ming wei :“pk+_+ biao ming ( huo suo xie )+_+ zhu jian biao shi ” ru “pk_YHXX_IDKH” deng
  3.2.6 wai jian
  biao wai jian ming ming wei : “fk+_+ biao ming ( huo suo xie )+_ zhu biao ming ( huo suo xie )+_+ zhu jian biao shi ” ru “fk_YHLX_YHXX_SFZH” deng
  3.2.7 CHECK yue shu
  CHECK yue shu ming ming wei : “chk+_+CHECK yue shu de lie ming ( huo suo xie )”
  3.2.8 UNIQUE yue shu
  UNIQUE yue shu ming ming wei : “unq+_+UNIQUE yue shu de lie ming ( huo suo xie )”
  3.2.9 suo yin
  suo yin de ming ming wei :“ biao ming ( huo suo xie )+_+ lie ming +_idx”。 qi zhong duo dan ci zu cheng de shu xing lie lie ming qu qian ji ge dan ci shou zi fu zai jia mo dan ci shou zi fu zu cheng ru yd_kh biao khid shang de index: yd_kh_khid_idx
  3.2.10 chu fa qi
  ★ AFTER xing chu fa qi
  xi tong ming +tr_+< biao ming >_+ +[_row]
  ★ BEFORE xing chu fa qi
  xi tong ming +tr_+< biao ming >_+bef_+[_row]
  ★ INSTEAD OF xing chu fa qi
  xi tong ming +ti_+< biao ming >+_++[_row]
  ★ ge zhong lei xing de chu fa qi zhong
  i,u,d fen bie biao shi insert、update he delete xing ji chu fa qi , hou jia _row biao shi , yu ju ji chu fa qi bu jia , ru yddftr_CSH_i_row
  3.2.11 cu
  cu yi cu zhong yao cun chu de ge ge biao ( huo biao bie ming ) ji biao jian jia and de zu cheng ming ming , ji biao “A+And+ biao B…”, ru cun chu GR( gong ren ) he GRJN( gong ren ji neng ) biao de cu ming ming wei GRAndGRJN
  3.3 shi tu
  shi tu ming ming yi xi tong ming v_+ mo kuai ming zuo wei qian zhui , qi ta ming ming gui ze he biao de ming ming lei si
  3.4 xu lie
  xu lie ming ming yi seq_+ han yi ming zu cheng
  3.5 tong yi ci
  tong yi ci ming ming yu qi ji chu dui xiang de ming cheng yi zhi , dan yao qu chu qi yong hu qian zhui huo han you yuan cheng shu ju ku lian jie de hou zhui
  3.6 cun chu dui xiang xiang guan
  3.6.1 cun chu guo cheng
  cun chu guo cheng ming ming you “ xi tong ming +sp+_+ cun chu guo cheng biao shi ( suo xie )” zu cheng cun chu guo cheng biao shi yao yi shi ji han yi de han yu pin yin de shou zi fu gou cheng , bing yong xia hua xian fen ge ge ge zu cheng bu fen 。 ru zeng jia dai li shang de zhang hu de cun chu guo cheng wei “sfsp_ZJDLSZH”。
  3.6.2 han shu
  han shu ming ming you “ xi tong ming +f+_+ han shu biao shi ” zu cheng
  3.6.3 bao
  bao ming ming you “ xi tong ming +pkg+_+ bao biao shi ” zu cheng
  3.6.4 han shu wen ben zhong de bian liang cai yong xia lie ge shi ming ming :
  ★ shen shu bian liang ming ming cai yong “i (o huo io)+_+ ming cheng ” xing shi , qian zhui i huo o biao shu ru huan shi shu chu shen shu
  ★ guo cheng bian liang ming ming cai yong “l+_+ ming cheng ” xing shi
  ★ quan ju bao bian liang ming ming cai yong “g+_+ ming cheng ” xing shi
  ★ you biao bian liang ming ming cai yong “ ming cheng +_+cur” xing shi
  ★ chang liang xing bian liang ming ming cai yong “c+_+ ming cheng ” xing shi
  ★ bian liang ming cai yong xiao xie , ruo shu yu ci zu xing shi , yong xia hua xian fen ge mei ge dan ci
  ★ bian liang yong lai cun fang biao zhong de lie huo xing shu ju zhi shi , shi yong %TYPE、%ROWTYPE fang shi sheng ming bian liang , shi bian liang sheng ming de lei xing yu biao zhong de bao chi tong bu , sui biao de bian hua er bian hua
  3.7 yong hu ji jiao se
  ★ yong hu ming ming you “ xi tong ming cheng +_+user+_+ ming ci ( huo suo xie ) huo ming ci duan yu ( huo suo xie )” zu cheng
  ★ jiao se ming ming you “ xi tong ming cheng +_+role+_+ ming ci ( huo suo xie ) huo ming ci duan yu ( huo suo xie )” zu cheng
  3.8 shu ju ku lian jie
  ★ shu ju ku lian jie ming ming you “ yuan cheng fu wu qi ming +_+ shu ju ku ming +_+link” zu cheng
  ★ ruo yuan cheng fu wu qi ming he shu ju ku ming yi zhi , shang shi “_+ shu ju ku ming ” bu fen sheng qu
  3.9 ming ming zhong de qi ta zhu yi shi xiang
  ★ ming ming dou bu de chao guo 30 ge zi fu 。
  ★ bu yao zai dui xiang ming de zi fu zhi jian liu kong ge
  ★ xiao xin bao liu ci , yao bao zheng ni de ming ming mei you he bao liu ci 、 shu ju ku xi tong huo zhe chang yong fang wen fang fa chong tu
  4、 bian ma gui fan
  4.1 yi ban xing zhu shi
  4.1.1 zhu shi jin ke neng jian jie 、 xiang xi er quan mian
  4.1.2 chuang jian mei yi shu ju ku dui xiang shi dou yao jia shang COMMENT ON zhu shi , yi shuo ming gai dui xiang de gong neng he yong tu ; jian biao shi , dui mou xie shu ju lie ye yao jia shang COMMENT ON zhu shi , yi shuo ming gai lie he / huo lie qu zhi de han yi 。 ru :XX biao zhong you CZZT lie shu xing wei NUMBER(10, 0) ke jia COMMENT ON zhu shi ru xia COMMENT ON COLUMN XX.CZZT IS '0 = zheng chang , 1 = deng dai , 2 = chao shi , 3 = deng chu '
  4.1.3 zhu shi yu fa bao han liang zhong qing kuang : dan xing zhu shi 、 duo xing zhu shi
  dan xing zhu shi : zhu shi qian you liang ge lian zi fu (--), yi ban dui bian liang 、 tiao jian zi ju ke yi cai yong gai lei zhu shi 。
  duo xing zhu shi : fu hao /* he */ zhi jian de nei rong wei zhu shi nei rong 。 dui mou xiang wan zheng de cao zuo jian yi shi yong gai lei zhu shi 。
  4.2 han shu wen ben zhu shi
  4.2.1 zai mei yi ge kuai he guo cheng ( cun chu guo cheng 、 han shu 、 bao 、 chu fa qi 、 shi tu deng ) de kai tou fang zhi zhu shi
  /************************************************************************
  *name : -- han shu ming
  *function : -- han shu gong neng
  *input : -- shu ru shen shu
  *output : -- shu chu shen shu
  *author : -- zuo zhe
  *CreateDate : -- chuang jian shi jian
  *UpdateDate : -- han shu geng gai xin xi ( bao kuo zuo zhe 、 shi jian 、 geng gai nei rong deng )
  *************************************************************************/
  CREATE [OR REPLACE] PROCEDURE dfsp_xxx
  …
  
  4.2.2 chuan ru shen shu de han yi ying gai you suo shuo ming 。 ru guo qu zhi fan wei que ding , ye ying gai yi bing shuo ming 。 qu zhi you te ding han yi de bian liang ( ru boolean lei xing bian liang ), ying gei chu mei ge zhi de han yi 。
  4.2.3 zai mei yi ge bian liang sheng ming de pang bian tian jia zhu shi 。 shuo ming gai bian liang yao yong zuo shen me
  tong chang , jian dan shi yong dan xing zhu shi jiu xing le , li ru l_sfzh CHAR(11) -- shen fen zheng hao ma
  4.2.4 zai kuai de mei ge zhu yao bu fen zhi qian tian jia zhu shi
  zai kuai de mei ge zhu yao bu fen zhi qian zeng jia zhu shi , jie shi xia — zu yu ju mu de , zui hao shi shuo ming gai duan yu ju ji suan fa de mu de yi ji yao de dao de jie guo , dan bu yao dui qi xi jie jin xing guo duo de miao shu
  4.2.5 zai kuai he guo cheng de kai tou zhu shi zhong huan ke yi zeng jia yao fang wen de shu ju ku deng xin xi
  4.3 chang yong SQL yu ju de bian xie gui fan
  4.3.1 CREATE yu ju
  CREATE TABLE dft_dksz(
  YHBS VARCHAR2(20) NOT NULL,
  ZHGX DATE,
  DKKHD VARCHAR2(24),
  CONSTRAINT pk_dksz_yhbs PRIMARY KEY (YHBS)
  )
  
  4.3.2 SELECT yu ju
  cha xun yu ju cai yong yi xia yuan ze bian xie ( ke zui da hua chong yong gong xiang chi zhong de SQL yu ju , ti gao ying yong cheng xu xing neng ):
  ★ jiang SELECT yu ju fen wei 5 bu fen :
  (1) you SELECT kai tou , hou gen yi ge xian shi cha xun jie guo de lie biao ;
  (2) you FROM kai tou , hou gen yi ge huo duo ge huo qu shu ju suo she ji de biao ;
  (3) you WHERE kai tou , hou gen yi ge huo duo ge que ding suo xu zhi de tiao jian ;
  (4) you GROUP BY kai tou , hou gen yi ge huo duo ge biao lie ming , tong guo zhe xie lie yi dui cha xun jie guo jin xing hui zong ;
  (5) you ORDER BY kai tou , hou gen yi ge huo duo ge biao lie ming , tong guo zhe xie lie yi dui cha xun jie guo jin xing pai xu 。
  ★ mei ge bu fen fen xing bian xie , jiang mei yi xing de di yi ge guan jian zi yu di yi xing de SELECT yi bu dui qi , ru
  SELECT col1, col2, col3
  FROM table1
  WHERE col1 > col2
  GROUP BY col1, col2
  ORDER BY col1;
  
  ★ guan jian zi yong da xie , lie ming he biao ming cai yong xiao xie
  ★ yu ju zhong qian ru dou hao shi , zai dou hao hou mian jia yi kong ge , dang dou hao shi zui hou yi ge zi fu shi , ba ta fang zai ben xing
  ★ dang yu ju de tong yi bu fen yao yan xu dao xia yi xing shi , an xia lie ge shi pai lie :
  SELECT col1, col2, col3, col4, col5, col6,
  col7, col8, col9, col10
  
  ★ jiang yu ju zhong WHERE he AND bu fen ge shi hua , shu xie bu ju lei si yu
  WHERE
  AND
  AND
  
  ★ dang yu ju zhong chu xian kuo hao shi , kuo hao de liang bian bu liu kong ge
  ★ zai SQL yu ju shi yong yun suan fu shi , cao zuo liang bian ying ge liu yi ge kong ge , ru
  WHERE X = Y
  AND A = B
  AND C = D
  
  4.3.3 INSERT yu ju
  INSERT INTO < yao cha ru de biao ming >
  (< lie 1>, < lie 2>, .., < lie n-1>, < lie n>)
  VALUES (< lie 1 zhi >, < lie 2 zhi >, .., < lie n-1 zhi >, < lie n zhi >)
  
  4.3.4 UPDATE yu ju
  UPDATE < yao geng xin de biao ming >
  SET < yao geng xin de lie > = < lie zhi >
  
  4.3.5 DELETE yu ju
  DELETE FROM table1
  WHERE col1 = '???'
  
  4.4 tiao jian zhi xing yu ju (IF) bian xie gui fan
  tiao jian zhi xing yu ju IF…ELSE an yi xia ge shi bian xie
  IF < tiao jian biao da shi >
  THEN
  < yi tiao huo duo tiao yu ju >
  [ELSE ( huo ELSIF< tiao jian biao da shi >)
  THEN
  < yi tiao huo duo tiao yu ju >
  END IF;
  
  zhu :
  (1) zai IF…THEN he ELSE( huo ELSIF) ji ELSE…THEN he END IF jian ke bao han yi tiao huo duo tiao PL/SQL
  yu ju , er bu xu yao jia BEGIN he END
  (2) IF…ELSE…ENDIF yu ju ke yi qian tao
  (3) zhu yi ELSIF de xie fa
  4.5 xun huan yu ju bian xie gui fan
  4.5.1 jian dan xun huan yu ju
  LOOP
  < ling tiao huo duo tiao yu ju >
  EXIT WHEN < tiao jian biao da shi >
  < ling tiao huo duo tiao yu ju >
  END LOOP;
  
  4.5.2 FOR xun huan yu ju
  FOR bian liang IN [ bian liang qu zhi fan wei ]
  LOOP
  < yi tiao huo duo tiao yu ju >
  END LOOP;
  
  4.5.3 WHILE xun huan yu ju
  WHILE < tiao jian biao da shi >
  LOOP
  < yi tiao huo duo tiao yu ju >
  END LOOP;
  
  4.6 han shu wen ben ( cun chu guo cheng 、 han shu he bao deng )
  ★ dui yu cun chu guo cheng 、 han shu deng cheng xu kuai dou yao you yi chang chu li bu fen , zai yi chang bu fen de zui hou dou yao she zhi OTHERS yi chang qing tai chu li qi , yi ti gao cheng xu de zi jian neng li , ge shi ru xia :
  BEGIN
  …
  EXCEPTION
  WHEN excep—name1 THEN
  …
  WHEN excep—name2 THEN
  …
  WHEN OTHERS THEN
  …
  END;
  
  ★ dui yu zi cheng xu 、 chu fa qi 、 bao deng dai ming de cheng xu kuai , yao shi yong jie shu biao shi , ru
  CREATE OR REPLACE PROCEDURE XXXsp_XXX IS
  …
  BEGIN
  …
  END XXXsp_XXX;
  /* ci chu de guo cheng ming XXXsp_XXX shi ke xuan de , gui fan yao qiu xie shang , yu kuai kai shi de CREATE xiang dui ying */【原文】【汉音对照
 
 
 
 
 
 
 
 
日版宠物情人插曲《Winding Road》歌词

日版宠物情人2017的插曲,很带节奏感,日语的,女生唱的。 最后听见是在第8集的时候女主手割伤了,然后男主用嘴帮她吸了一下,插曲就出来了。 歌手:Def...

兄弟共妻,我成了他们夜里的美食

老钟家的两个儿子很特别,就是跟其他的人不太一样,魔一般的执着。兄弟俩都到了要结婚的年龄了,不管自家老爹怎么磨破嘴皮子,兄弟俩说不娶就不娶,老父母为兄弟两操碎了心...

如何磨出破洞牛仔裤?牛仔裤怎么剪破洞?

把牛仔裤磨出有线的破洞 1、具体工具就是磨脚石,下面垫一个硬物,然后用磨脚石一直磨一直磨,到把那块磨薄了,用手撕开就好了。出来的洞啊很自然的。需要猫须的话调几...

我就是扫描下图得到了敬业福和爱国福

先来看下敬业福和爱国福 今年春节,支付宝再次推出了“五福红包”活动,表示要“把欠大家的敬业福都还给大家”。 今天该活动正式启动,和去年一样,需要收集“五福”...

冰箱异味产生的原因和臭味去除的方法

有时候我们打开冰箱就会闻到一股异味,冰箱里的这种异味是因为一些物质发出的气味的混合体,闻起来让人恶心。 产生这些异味的主要原因有以下几点。 1、很多人有这种习...

 
 
1、 bian xie mu de shi yong tong yi de ming ming he bian ma gui fan , shi shu ju ku ming ming ji bian ma feng ge biao zhun hua , yi bian yu yue du 、 li jie he ji cheng 。 2、 shi yong fan wei ben gui fan shi yong yu gong si fan wei nei suo you yi ORACLE zuo wei hou tai shu ju ku de ying yong xi tong he xiang mu kai fa gong zuo 。 3、 dui xiang ming ming gui fan 3.1 shu ju ku he SID shu ju ku ming ding yi wei xi tong ming + mo kuai ming ★ quan ju shu ju ku ming he li cheng SID ming yao qiu yi zhi ★ yin SID ming zhi neng bao han zi fu he shu zi , suo yi quan ju shu ju ku ming he SID ming zhong bu neng han you “_” deng zi fu 3.2 biao xiang guan 3.2.1 biao kong jian ★ mian xiang yong hu de zhuan yong shu ju biao kong jian yi yong hu ming +_+data ming ming , ru Aud yong hu zhuan yong shu ju biao kong jian ke ming ming wei Aud_data ★ mian xiang yong hu de zhuan yong suo yin biao kong jian yi yong hu ming +_+idx ming ming ★ mian xiang yong hu de zhuan yong lin shi biao kong jian yi yong hu ming +_+tmp ming ming ★ mian xiang yong hu de zhuan yong hui gun duan biao kong jian yi yong hu ming +_+rbs ming ming ★ mian xiang ying yong de biao kong jian yi ying yong ming +_data/ ying yong ming +_idx/ ying yong ming +_tmp/ ying yong ming +_rbs ming ming ★ LOB duan shu ju zhuan yong biao kong jian yi qi shu ju biao kong jian +_+lobs ming ming , ru shang li zhong shu ju biao kong jian wei Aud_data, ze LOB duan biao kong jian ke ming ming wei Aud_data_lobs 3.2.2 biao kong jian wen jian biao kong jian wen jian ming ming yi biao kong jian ming + liang wei shu xu hao ( xu hao cong 01 kai shi ) zu cheng , ru Aud_data01 deng 3.2.3 biao biao ming ming yao zun xun yi xia yuan ze : ★ yi ban biao cai yong “ xi tong ming +t_+ mo kuai ming +_+ biao yi ming ” ge shi gou cheng ★ ruo shu ju ku zhong zhi han you dan ge mo kuai , ming ming ke cai yong “ xi tong ming +t_+ biao yi ming ” ge shi gou cheng ★ mo kuai ming huo biao yi ming yun yi qi han yu pin yin de shou zi fu ming ming , biao yi ming zhong han yu pin yin yun cai yong xiao xie , qie zi fu jian bu jia fen ge fu ; ★ biao bie ming ming ming gui ze : qu biao yi ming de qian 3 ge zi fu jia zui hou yi ge zi fu 。 ru guo cun zai chong tu , shi dang zeng jia zi fu ( ru qu biao yi ming de qian 4 ge zi fu jia zui hou yi ge zi fu deng ) ★ lin shi biao cai yong “ xi tong ming +t_tmp_+ biao yi ming ” ge shi gou cheng ★ biao de ming ming ru dft_gy_cbap: xi tong ming ( dian fei df)+t_+ mo kuai ming ( gao ya gy)+_+ biao yi ming ( chao biao an pai cbap) dft_cbbj: xi tong ming ( dian fei df)+t_+ biao yi ming ( chao biao biao ji cbbj) dft_tmp_hj: xi tong ming ( dian fei df)+tmp+ biao yi ming ( he ji hj)( ci chu wei lin shi biao ) ★ guan lian biao ming ming wei Re_ biao A_ biao B,Re shi Relative de suo xie , biao A he biao B yun cai yong qi biao yi ming huo suo xie xing shi 。 3.2.4 shu xing ( lie huo zi duan ) shu xing ming ming zun xun yi xia yuan ze : ★ cai yong you yi yi de lie ming , wei shi ji han yi de han yu pin yin de shou zi fu , qie zi fu jian bu jia ren he fen ge fu ★ shu xing ming qian bu yao jia biao ming deng zuo wei qian zhui ★ shu xing hou bu jia ren he lei xing biao shi zuo wei hou zhui ★ bu yao shi yong “ID” zuo wei lie ming ★ guan lian zi duan ming ming yi “cd+_+ guan lian biao de biao yi ming ( huo suo xie )+_+ zi duan ming ” jin xing 3.2.5 zhu jian ★ ren he biao dou bi xu ding yi zhu jian ★ biao zhu jian ming ming wei :“pk+_+ biao ming ( huo suo xie )+_+ zhu jian biao shi ” ru “pk_YHXX_IDKH” deng 3.2.6 wai jian biao wai jian ming ming wei : “fk+_+ biao ming ( huo suo xie )+_ zhu biao ming ( huo suo xie )+_+ zhu jian biao shi ” ru “fk_YHLX_YHXX_SFZH” deng 3.2.7 CHECK yue shu CHECK yue shu ming ming wei : “chk+_+CHECK yue shu de lie ming ( huo suo xie )” 3.2.8 UNIQUE yue shu UNIQUE yue shu ming ming wei : “unq+_+UNIQUE yue shu de lie ming ( huo suo xie )” 3.2.9 suo yin suo yin de ming ming wei :“ biao ming ( huo suo xie )+_+ lie ming +_idx”。 qi zhong duo dan ci zu cheng de shu xing lie lie ming qu qian ji ge dan ci shou zi fu zai jia mo dan ci shou zi fu zu cheng ru yd_kh biao khid shang de index: yd_kh_khid_idx 3.2.10 chu fa qi ★ AFTER xing chu fa qi xi tong ming +tr_+< biao ming >_+ +[_row] ★ BEFORE xing chu fa qi xi tong ming +tr_+< biao ming >_+bef_+[_row] ★ INSTEAD OF xing chu fa qi xi tong ming +ti_+< biao ming >+_++[_row] ★ ge zhong lei xing de chu fa qi zhong i,u,d fen bie biao shi insert、update he delete xing ji chu fa qi , hou jia _row biao shi , yu ju ji chu fa qi bu jia , ru yddftr_CSH_i_row 3.2.11 cu cu yi cu zhong yao cun chu de ge ge biao ( huo biao bie ming ) ji biao jian jia and de zu cheng ming ming , ji biao “A+And+ biao B…”, ru cun chu GR( gong ren ) he GRJN( gong ren ji neng ) biao de cu ming ming wei GRAndGRJN 3.3 shi tu shi tu ming ming yi xi tong ming v_+ mo kuai ming zuo wei qian zhui , qi ta ming ming gui ze he biao de ming ming lei si 3.4 xu lie xu lie ming ming yi seq_+ han yi ming zu cheng 3.5 tong yi ci tong yi ci ming ming yu qi ji chu dui xiang de ming cheng yi zhi , dan yao qu chu qi yong hu qian zhui huo han you yuan cheng shu ju ku lian jie de hou zhui 3.6 cun chu dui xiang xiang guan 3.6.1 cun chu guo cheng cun chu guo cheng ming ming you “ xi tong ming +sp+_+ cun chu guo cheng biao shi ( suo xie )” zu cheng cun chu guo cheng biao shi yao yi shi ji han yi de han yu pin yin de shou zi fu gou cheng , bing yong xia hua xian fen ge ge ge zu cheng bu fen 。 ru zeng jia dai li shang de zhang hu de cun chu guo cheng wei “sfsp_ZJDLSZH”。 3.6.2 han shu han shu ming ming you “ xi tong ming +f+_+ han shu biao shi ” zu cheng 3.6.3 bao bao ming ming you “ xi tong ming +pkg+_+ bao biao shi ” zu cheng 3.6.4 han shu wen ben zhong de bian liang cai yong xia lie ge shi ming ming : ★ shen shu bian liang ming ming cai yong “i (o huo io)+_+ ming cheng ” xing shi , qian zhui i huo o biao shu ru huan shi shu chu shen shu ★ guo cheng bian liang ming ming cai yong “l+_+ ming cheng ” xing shi ★ quan ju bao bian liang ming ming cai yong “g+_+ ming cheng ” xing shi ★ you biao bian liang ming ming cai yong “ ming cheng +_+cur” xing shi ★ chang liang xing bian liang ming ming cai yong “c+_+ ming cheng ” xing shi ★ bian liang ming cai yong xiao xie , ruo shu yu ci zu xing shi , yong xia hua xian fen ge mei ge dan ci ★ bian liang yong lai cun fang biao zhong de lie huo xing shu ju zhi shi , shi yong %TYPE、%ROWTYPE fang shi sheng ming bian liang , shi bian liang sheng ming de lei xing yu biao zhong de bao chi tong bu , sui biao de bian hua er bian hua 3.7 yong hu ji jiao se ★ yong hu ming ming you “ xi tong ming cheng +_+user+_+ ming ci ( huo suo xie ) huo ming ci duan yu ( huo suo xie )” zu cheng ★ jiao se ming ming you “ xi tong ming cheng +_+role+_+ ming ci ( huo suo xie ) huo ming ci duan yu ( huo suo xie )” zu cheng 3.8 shu ju ku lian jie ★ shu ju ku lian jie ming ming you “ yuan cheng fu wu qi ming +_+ shu ju ku ming +_+link” zu cheng ★ ruo yuan cheng fu wu qi ming he shu ju ku ming yi zhi , shang shi “_+ shu ju ku ming ” bu fen sheng qu 3.9 ming ming zhong de qi ta zhu yi shi xiang ★ ming ming dou bu de chao guo 30 ge zi fu 。 ★ bu yao zai dui xiang ming de zi fu zhi jian liu kong ge ★ xiao xin bao liu ci , yao bao zheng ni de ming ming mei you he bao liu ci 、 shu ju ku xi tong huo zhe chang yong fang wen fang fa chong tu 4、 bian ma gui fan 4.1 yi ban xing zhu shi 4.1.1 zhu shi jin ke neng jian jie 、 xiang xi er quan mian 4.1.2 chuang jian mei yi shu ju ku dui xiang shi dou yao jia shang COMMENT ON zhu shi , yi shuo ming gai dui xiang de gong neng he yong tu ; jian biao shi , dui mou xie shu ju lie ye yao jia shang COMMENT ON zhu shi , yi shuo ming gai lie he / huo lie qu zhi de han yi 。 ru :XX biao zhong you CZZT lie shu xing wei NUMBER(10, 0) ke jia COMMENT ON zhu shi ru xia COMMENT ON COLUMN XX.CZZT IS '0 = zheng chang , 1 = deng dai , 2 = chao shi , 3 = deng chu ' 4.1.3 zhu shi yu fa bao han liang zhong qing kuang : dan xing zhu shi 、 duo xing zhu shi dan xing zhu shi : zhu shi qian you liang ge lian zi fu (--), yi ban dui bian liang 、 tiao jian zi ju ke yi cai yong gai lei zhu shi 。 duo xing zhu shi : fu hao /* he */ zhi jian de nei rong wei zhu shi nei rong 。 dui mou xiang wan zheng de cao zuo jian yi shi yong gai lei zhu shi 。 4.2 han shu wen ben zhu shi 4.2.1 zai mei yi ge kuai he guo cheng ( cun chu guo cheng 、 han shu 、 bao 、 chu fa qi 、 shi tu deng ) de kai tou fang zhi zhu shi /************************************************************************ *name : -- han shu ming *function : -- han shu gong neng *input : -- shu ru shen shu *output : -- shu chu shen shu *author : -- zuo zhe *CreateDate : -- chuang jian shi jian *UpdateDate : -- han shu geng gai xin xi ( bao kuo zuo zhe 、 shi jian 、 geng gai nei rong deng ) *************************************************************************/ CREATE [OR REPLACE] PROCEDURE dfsp_xxx … 4.2.2 chuan ru shen shu de han yi ying gai you suo shuo ming 。 ru guo qu zhi fan wei que ding , ye ying gai yi bing shuo ming 。 qu zhi you te ding han yi de bian liang ( ru boolean lei xing bian liang ), ying gei chu mei ge zhi de han yi 。 4.2.3 zai mei yi ge bian liang sheng ming de pang bian tian jia zhu shi 。 shuo ming gai bian liang yao yong zuo shen me tong chang , jian dan shi yong dan xing zhu shi jiu xing le , li ru l_sfzh CHAR(11) -- shen fen zheng hao ma 4.2.4 zai kuai de mei ge zhu yao bu fen zhi qian tian jia zhu shi zai kuai de mei ge zhu yao bu fen zhi qian zeng jia zhu shi , jie shi xia — zu yu ju mu de , zui hao shi shuo ming gai duan yu ju ji suan fa de mu de yi ji yao de dao de jie guo , dan bu yao dui qi xi jie jin xing guo duo de miao shu 4.2.5 zai kuai he guo cheng de kai tou zhu shi zhong huan ke yi zeng jia yao fang wen de shu ju ku deng xin xi 4.3 chang yong SQL yu ju de bian xie gui fan 4.3.1 CREATE yu ju CREATE TABLE dft_dksz( YHBS VARCHAR2(20) NOT NULL, ZHGX DATE, DKKHD VARCHAR2(24), CONSTRAINT pk_dksz_yhbs PRIMARY KEY (YHBS) ) 4.3.2 SELECT yu ju cha xun yu ju cai yong yi xia yuan ze bian xie ( ke zui da hua chong yong gong xiang chi zhong de SQL yu ju , ti gao ying yong cheng xu xing neng ): ★ jiang SELECT yu ju fen wei 5 bu fen : (1) you SELECT kai tou , hou gen yi ge xian shi cha xun jie guo de lie biao ; (2) you FROM kai tou , hou gen yi ge huo duo ge huo qu shu ju suo she ji de biao ; (3) you WHERE kai tou , hou gen yi ge huo duo ge que ding suo xu zhi de tiao jian ; (4) you GROUP BY kai tou , hou gen yi ge huo duo ge biao lie ming , tong guo zhe xie lie yi dui cha xun jie guo jin xing hui zong ; (5) you ORDER BY kai tou , hou gen yi ge huo duo ge biao lie ming , tong guo zhe xie lie yi dui cha xun jie guo jin xing pai xu 。 ★ mei ge bu fen fen xing bian xie , jiang mei yi xing de di yi ge guan jian zi yu di yi xing de SELECT yi bu dui qi , ru SELECT col1, col2, col3 FROM table1 WHERE col1 > col2 GROUP BY col1, col2 ORDER BY col1; ★ guan jian zi yong da xie , lie ming he biao ming cai yong xiao xie ★ yu ju zhong qian ru dou hao shi , zai dou hao hou mian jia yi kong ge , dang dou hao shi zui hou yi ge zi fu shi , ba ta fang zai ben xing ★ dang yu ju de tong yi bu fen yao yan xu dao xia yi xing shi , an xia lie ge shi pai lie : SELECT col1, col2, col3, col4, col5, col6, col7, col8, col9, col10 ★ jiang yu ju zhong WHERE he AND bu fen ge shi hua , shu xie bu ju lei si yu WHERE AND AND ★ dang yu ju zhong chu xian kuo hao shi , kuo hao de liang bian bu liu kong ge ★ zai SQL yu ju shi yong yun suan fu shi , cao zuo liang bian ying ge liu yi ge kong ge , ru WHERE X = Y AND A = B AND C = D 4.3.3 INSERT yu ju INSERT INTO < yao cha ru de biao ming > (< lie 1>, < lie 2>, .., < lie n-1>, < lie n>) VALUES (< lie 1 zhi >, < lie 2 zhi >, .., < lie n-1 zhi >, < lie n zhi >) 4.3.4 UPDATE yu ju UPDATE < yao geng xin de biao ming > SET < yao geng xin de lie > = < lie zhi > 4.3.5 DELETE yu ju DELETE FROM table1 WHERE col1 = '???' 4.4 tiao jian zhi xing yu ju (IF) bian xie gui fan tiao jian zhi xing yu ju IF…ELSE an yi xia ge shi bian xie IF < tiao jian biao da shi > THEN < yi tiao huo duo tiao yu ju > [ELSE ( huo ELSIF< tiao jian biao da shi >) THEN < yi tiao huo duo tiao yu ju > END IF; zhu : (1) zai IF…THEN he ELSE( huo ELSIF) ji ELSE…THEN he END IF jian ke bao han yi tiao huo duo tiao PL/SQL yu ju , er bu xu yao jia BEGIN he END (2) IF…ELSE…ENDIF yu ju ke yi qian tao (3) zhu yi ELSIF de xie fa 4.5 xun huan yu ju bian xie gui fan 4.5.1 jian dan xun huan yu ju LOOP < ling tiao huo duo tiao yu ju > EXIT WHEN < tiao jian biao da shi > < ling tiao huo duo tiao yu ju > END LOOP; 4.5.2 FOR xun huan yu ju FOR bian liang IN [ bian liang qu zhi fan wei ] LOOP < yi tiao huo duo tiao yu ju > END LOOP; 4.5.3 WHILE xun huan yu ju WHILE < tiao jian biao da shi > LOOP < yi tiao huo duo tiao yu ju > END LOOP; 4.6 han shu wen ben ( cun chu guo cheng 、 han shu he bao deng ) ★ dui yu cun chu guo cheng 、 han shu deng cheng xu kuai dou yao you yi chang chu li bu fen , zai yi chang bu fen de zui hou dou yao she zhi OTHERS yi chang qing tai chu li qi , yi ti gao cheng xu de zi jian neng li , ge shi ru xia : BEGIN … EXCEPTION WHEN excep—name1 THEN … WHEN excep—name2 THEN … WHEN OTHERS THEN … END; ★ dui yu zi cheng xu 、 chu fa qi 、 bao deng dai ming de cheng xu kuai , yao shi yong jie shu biao shi , ru CREATE OR REPLACE PROCEDURE XXXsp_XXX IS … BEGIN … END XXXsp_XXX; /* ci chu de guo cheng ming XXXsp_XXX shi ke xuan de , gui fan yao qiu xie shang , yu kuai kai shi de CREATE xiang dui ying */
󰈣󰈤
  免责声明:本文仅代表作者个人观点,与王朝网络无关。王朝网络登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
越来越漂亮的楚楚(7)
越来越漂亮的楚楚(6)
越来越漂亮的楚楚(5)
越来越漂亮的楚楚(4)
共长一色
水中莲
峰林晚照
远离喧嚣——山村小景
 
>>返回首页<<
 为你推荐
 
 
 转载本文
 UBB代码 HTML代码
复制到剪贴板...
 
 热帖排行
 
 
 
 
©2005- 王朝网络 版权所有