資源描述:
《oracle語(yǔ)法(oracle語(yǔ)法)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫(kù)。
1、oracle語(yǔ)法(oracle語(yǔ)法)BasicconceptsDDLdatadefinitionlanguage-buildingdatabaseobjectsCreate/alter/drop/truncateDMLdatamanipulationlanguage-dataviewandmaintenanceSelect/insert/delete/updateTCLtransactioncontrollanguage-whetherdataissavedtothedatabaseCommit/rollbac
2、k/savepointDCLdatacontrollanguage--viewthepermissionsofobjectsGrant/revokeDatabasedesignCompositionofrelationaldatamodelOneormoresheetsTableindexviewtriggerTherelationbetweentableandtableDatabaseSchemaConceptually:agroupofDDLPhysical:anamespacethatcontainsta
3、bles,processes,viewscollectionsCommoncommandsConnectusername/passwordconnectedtothespecifieduserThestructureofdesctab_nameviewtabletab_nameQuit/exitexitClearscreenclearscreenSetlinesize200setsonelineanddisplays200charactersSetPageSize20sets20linesperpageDbms
4、_output.put_line()print,similartoSystem.out.println();Setserveroutputonopenstheserveroutput,otherwisetheaboveprintstatementiswrongEditeditsthestatementsinthecacheExecutethelaststatementblock/repeatableexecution@sqlpathexecutesaSQLfile@@sqlfileimplementationo
5、fthesqlpathenvironmentvariablefileSpoolfileprintlogtotextfileSpooloffstopprintingIntheprocessof#entertheSQLstatementinthetemporaryfirstrunasql*pluscommandLookatthesizeoftheshortcharactersSELECTDBMS_LOB.GETLENGTH(MYCLOB)FROMATTACHMENT;//MYCLOBiscolumnname,and
6、ATTACHMENTistablenameSELECTDBMS_LOB.GETLENGTH(MYBLOB)FROMATTACHMENT;CommontablesUser_constraintsuserconstraintsUser_tablesusertableAll_all_tablesallusertablesAll_constraintsallconstraintsUser_cons_columnsconstraintcolumnAll_cons_columnsallconstraintcolumnsNl
7、s_session_parameterscurrentsessioninformationV$nls_parameterssystemparametersdatatypeCharacterCharmaximum2000bytesfixedlengthVARCHAR2maximum4000byteslongerNumerictypeThe-38secondorderofnumber10to10ofthe38canrepresentdecimal,alsocanrepresentintegerDate,Dateco
8、ntainsthedateandtimeeveryminute7bytesLargeobjectCLOBcharacterlargeobject>4000bytemaximum4GBlobbinarylargeobjectimage/sound4GPseudotype%typecanrefertothetypeofacolumn%rowtypecanrefertoatableasaty