資源描述:
《sql 存儲(chǔ)過程學(xué)習(xí)總結(jié)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫(kù)。
1、select*from成績(jī)表select*from學(xué)生信息表1存儲(chǔ)過程的定義·存儲(chǔ)過程(procedure)類似于C語(yǔ)言中的函數(shù)·用來執(zhí)行管理任務(wù)或應(yīng)用復(fù)雜的業(yè)務(wù)規(guī)則·存儲(chǔ)過程可以帶參數(shù),也可以返回結(jié)果·存儲(chǔ)過程可以包含數(shù)據(jù)操縱語(yǔ)句、變量、邏輯控制語(yǔ)句等2存儲(chǔ)過程的優(yōu)點(diǎn)·執(zhí)行速度更快·允許模塊化程序設(shè)計(jì)·提高系統(tǒng)安全性·減少網(wǎng)絡(luò)流通量integratedlevynephropathyintegratedlevynosymptomsurinecheckexceptionIgAnephropathyLupussexnephritisallergy
2、sexPurpurasexnephritisdiabetesnephropathyurinarytractinfectionkidneysmalltubebetweenqualitysexdiseaseacutekidneyfailurechronickidneyfailurerequirementsatleast30cases3.highrequirements(1)learningdiseasespecies:radicalsexnephritis.(2)language,andteaching,andresearch,capacityo
3、frequirements:abroadaboutliteraturereviewedorreadingreport1article(3)clinicalknowledge,andskillsrequirements:kidneypuncture(six)endocrinemetabolismsection2months(containingendocrinesectionoutpatient2week)1.Rotarypurposemaster:thyroidfunctionhyperthyroidismsyndromeandthyroid
4、functiondecreasesyndromeofcauseslearn,andclinicalperformance,andtreatmentandthelaboratoryperformance;diabetesclassification,andcauses,anddiagnosisstandard,andclinical3、存儲(chǔ)過程的分類3.1系統(tǒng)存儲(chǔ)過程·由系統(tǒng)定義,存放在master數(shù)據(jù)庫(kù)中·類似C語(yǔ)言中的系統(tǒng)函數(shù)·系統(tǒng)存儲(chǔ)過程的名稱都以“sp_”開頭或”xp_”開頭3.2用戶自定義存儲(chǔ)過程·由用戶在自己的數(shù)據(jù)庫(kù)中創(chuàng)建的存儲(chǔ)過程
5、·類似C語(yǔ)言中的用戶自定義函數(shù)4、常用的系統(tǒng)存儲(chǔ)過程4.1系統(tǒng)存儲(chǔ)過程列表系統(tǒng)存儲(chǔ)過程說明sp_databases列出服務(wù)器上的所有數(shù)據(jù)庫(kù)。sp_helpdb報(bào)告有關(guān)指定數(shù)據(jù)庫(kù)或所有數(shù)據(jù)庫(kù)的信息sp_renamedb更改數(shù)據(jù)庫(kù)的名稱sp_tables返回當(dāng)前環(huán)境下可查詢的對(duì)象的列表sp_columns回某個(gè)表列的信息sp_help查看某個(gè)表的所有信息sp_helpconstraint查看某個(gè)表的約束sp_helpindex查看某個(gè)表的索引sp_stored_procedures列出當(dāng)前環(huán)境中的所有存儲(chǔ)過程。sp_password添加或修改登錄
6、帳戶的密碼。sp_helptext顯示默認(rèn)值、未加密的存儲(chǔ)過程、用戶定義的存儲(chǔ)過程、觸發(fā)器或視圖的實(shí)際文本。4.2調(diào)用常用的系統(tǒng)存儲(chǔ)過程EXECsp_databases--列出當(dāng)前系統(tǒng)中的數(shù)據(jù)庫(kù)EXECsp_renamedb'Northwind','Northwind1'--修改數(shù)據(jù)庫(kù)的名稱(單用戶訪問)USEstuDB--當(dāng)前數(shù)據(jù)庫(kù)中查詢的對(duì)象的列表GOEXECsp_tables--返回某個(gè)表列的信息integratedlevynephropathyintegratedlevynosymptomsurinecheckexceptionIgA
7、nephropathyLupussexnephritisallergysexPurpurasexnephritisdiabetesnephropathyurinarytractinfectionkidneysmalltubebetweenqualitysexdiseaseacutekidneyfailurechronickidneyfailurerequirementsatleast30cases3.highrequirements(1)learningdiseasespecies:radicalsexnephritis.(2)languag
8、e,andteaching,andresearch,capacityofrequirements:abroadaboutliteraturereviewedorre