上一页 1 ··· 61 62 63 64 65 66 67 68 69 ··· 76 下一页
摘要: General FunctionsThe following functions work with any data ype and pertain to using nulls:NVL(expr1,expr2)NVL2(expr1,expr2,expr3)NULLIF(expr1,expr2)COALESCE(expr1,expr2,...,exprn)NVL FunctionConverts an null value to an actual value:Data types that can be used are date,character,and number.Data typ 阅读全文
posted @ 2013-04-12 17:24 ArcerZhang 阅读(236) 评论(0) 推荐(0) 编辑
摘要: Nesting FunctionsSingle-row functions can be nested to any level.Nested functions are evaluated from the deepese level to the least deep level.View Code SQL> SELECT last_name,UPPER(CONCAT(SUBSTR(LAST_NAME,1,8),'_US')) FROM employees WHERE department_id = 60;LAST_NAME UPPER(CONCAT(SUB... 阅读全文
posted @ 2013-04-12 16:51 ArcerZhang 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Conversions FunctionsImplicit Data Type ConversionIn expressions,the Oracle server can automatically conver the following:FromToVARCHAR2 or CHARNUMBERVARCHAR2 or CHARDATEDemo-01:View Code SQL> SELECT employee_id,first_name,TO_CHAR(hire_date,'YYYY-MM-DD HH24:MI:SS') FROM employees WHERE hi 阅读全文
posted @ 2013-04-12 15:36 ArcerZhang 阅读(198) 评论(0) 推荐(0) 编辑
摘要: Using Conversion Functions and Conditional ExpressionsAfter completing this lesson,you should be able to do the following:Describe various types of conversion functions that are available in SQLUse the TO_CHAR,TO_NUMBER,and TO_DATE conversion functions.Apply conditional expressions in a SELECT state 阅读全文
posted @ 2013-04-12 14:45 ArcerZhang 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Working with DatesThe Oracle database stores dates in an internal numeric format:century,year,month,day,hours,minutes,and seconds.The default date display format is DD-MON-RR.-Enables you to store 21st-century dates in the 20th century by specifying only the last two digits of the year.-Enables you 阅读全文
posted @ 2013-04-12 14:08 ArcerZhang 阅读(161) 评论(0) 推荐(0) 编辑
摘要: Number FunctionsROUND:Rounds value to a specified deciamlTRUNC:Truncates value to a specified decimalMOD:Returns remainder fo divisionFunctionResultROUND(45.926,2)45.93TRUNC(45.926,2)45.92MOD(1600,300)100Demo-01:Using the ROUND FunctionSQL> SELECT ROUND(45.923,2),ROUND(45.923,0),ROUND(45.923,-1) 阅读全文
posted @ 2013-04-12 12:35 ArcerZhang 阅读(185) 评论(0) 推荐(0) 编辑
摘要: ObjectivesAfter completing this lesson,you should be able to do the following:Describe various types of functions available in SQL.Use character,number,and date functions in SELECT statements.Lesson AgendaSingle-row SQL functionsCharacter functionsNumber functionsWorking with datesDate functions/* 函 阅读全文
posted @ 2013-04-12 10:38 ArcerZhang 阅读(317) 评论(0) 推荐(0) 编辑
摘要: Constraint NameDescriblePRIMARY KEY主键约束,一张表中即可以有主键也可以没有;如果有,有且只能有一个PRIMARY KEY.FOREIGN KEY外键约束NOT NULL非空约束UNIQUE唯一约束.主键约束,从约束本身来讲就相当于(NOT NULL) + (UNIQUE)CHECK检查约束 阅读全文
posted @ 2013-04-11 19:13 ArcerZhang 阅读(180) 评论(0) 推荐(0) 编辑
摘要: SynonymCreating a Synonym for an Object Simplify access to objects by creating a synonym(another name for an object).With synonyms ,you can:Create an easier reference to a table that is owned by another user Shorten length object namesCREATE [PUBLIC] SYNONYM synonym FRO object; PUBLIC关键词,如果指定了,则全局都可 阅读全文
posted @ 2013-04-11 19:12 ArcerZhang 阅读(216) 评论(0) 推荐(0) 编辑
摘要: Indexes是可选项,可有可无;它存在的价值就是improves the performance of some queries.An index:Is a schema object Can be used by the Oracle server to speed up the retrieval of rows by using a pointerCan reduce disk input/output(I/O) by using a rapid path access method to locate data quicklyIs independent of the table t 阅读全文
posted @ 2013-04-11 19:06 ArcerZhang 阅读(145) 评论(0) 推荐(0) 编辑
上一页 1 ··· 61 62 63 64 65 66 67 68 69 ··· 76 下一页