资源描述:
《SQL_PLSQL培训》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、SQLPL/SQL语言基础参考资料lSQLReference:语法及函数参考lErrorMessage:出错信息lSQLPlusGuideandReferencelPL/SQLUser’sGuideandReferencelApplicationDeveloper’sGuide–Fundamentals:开发ORACLE应用的一般性指导lSuppliedPL/SQLPackagesReference:PL/SQL内置Package参考SQL基础历史Dr.E.F.Codd于1970年在ACM(AssociationOfCompute
2、rMechanism)月刊上发表了"ARelationalModelofDataforLargeSharedDataBanks",建立了关系模型。1979年,RelationalSoftware,Inc.(现在的OracleCorporation)发布了第一个SQL商业应用。标准lSQL-92:Entry,Transitional,Intermediate,andFulllCoreSQL-99参见SQLReference附录B:OracleandStandardSQLBasicElementsofOracleSQLlLiteral
3、s(Text,Integer,Number,Interval)lDatatypeslFormatModelslNullslPseudocolumns[sju:dou];lCommentslDatabaseObjectslSchemaObjectNamesandQualifierslReferringtoSchemaObjectsandPartsPhil第25页2021/9/1LiteralsThetermsliteralandconstantvaluearesynonymousandrefertoafixeddatavalue.l
4、Text’jack’’ssword’length<4000lIntegerlNumber38digitsofprecision.lIntervalspecifiesaperiodoftimeDatatypeslBuilt-inDatatypeslUser-definedtypeBuilt-inDatatypeslVARCHAR2页:2Specialskills:thewhereclauselike‘wherecollike:x1
5、
6、’%’areinefficient,thereindexovercolumncolwillnotbe
7、applied,use‘wherecolbetween:x1and:x1
8、
9、chr(255)instead.(size)NVARCHAR2(size)lNUMBER(p,s)lLONGlDATElRAW(size)LONGRAWlROWIDUROWID[(size)]lCHAR页:2Therearetwocomparisonruleswhencomparingcharactervalues:blank-paddedcomparisonsemanticsandnonpaddedcomparisonsemantics.Blank-pa
10、ddedcomparisonisappliedinCHAR/NCHAR,textliterals.(size)NCHAR(size)lCLOBNCLOBBLOBBFILEMoreinformationaboutOracledatatype,seeSQLReferenceorServerApplicationDeveloper’sGuideROWID:(extendedfmt:OOOOOO-FFF-BBBBBB-RRR;restrictedfmt:BBBBBBBB.RRRR.FFFF,useDBMS_ROWID.ROWID_TO_R
11、ESTRICTEDtomaketheconversion)DataConversionlImplicitDataConversionlExplicitDataConversionTogetmoreinformationaboutexplicitdataconversion,seeSQLReference,frompage2-35‘Dataconversion’topage2-53;orseethereferencesofrelevantoraclefunctions.NULLTotestfornulls,useonlythecom
12、parisonoperatorsISNULLandISNOTNULL.Ifyouuseanyotheroperatorwithnullsandtheresultdependsonthevalueofthenull,theresultisUNKNOW