Danh mục

OCA: Oracle Database 11g Administrator Certified Associate Study Guide- P4

Số trang: 50      Loại file: pdf      Dung lượng: 527.56 KB      Lượt xem: 10      Lượt tải: 0    
Thu Hiền

Phí tải xuống: 10,000 VND Tải xuống file đầy đủ (50 trang) 0
Xem trước 5 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

OCA: Oracle Database 11g Administrator Certified Associate Study Guide- P4: There is high demand for professionals in the information technology (IT) industry, andOracle certifications are the hottest credential in the database world. You have made theright decision to pursue certification, because being Oracle Database 11g certified will giveyou a distinct advantage in this highly competitive market.
Nội dung trích xuất từ tài liệu:
OCA: Oracle Database 11g Administrator Certified Associate Study Guide- P4 Using Single-Row Numeric Functions 81ta b l e 2 . 2 Numeric Function Summary (continued)Function DescriptionATAN2 Returns the arc tangent; takes two inputsBITAND Returns the result of a bitwise AND on two inputsCEIL Returns the next higher integerCOS Returns the cosineCOSH Returns the hyperbolic cosineEXP Returns the base of natural logarithms raised to a powerFLOOR Returns the next smaller integerLN Returns the natural logarithmLOG Returns the logarithmMOD Returns the modulo (remainder) of a division operationNANVL Returns an alternate number if the value is Not a Number (NaN) for BINARY_FLOAT and BINARY_DOUBLE numbersPOWER Returns a number raised to an arbitrary powerREMAINDER Returns the remainder in a division operationROUND Rounds a numberSIGN Returns an indicator of sign: negative, positive, or zeroSIN Returns the sineSINH Returns the hyperbolic sineSQRT Returns the square root of a numberTAN Returns the tangentTANH Returns the hyperbolic tangentTRUNC Truncates a numberWIDTH_BUCKET Creates equal-width histograms82 Chapter 2 N Using Single-Row FunctionsNumeric Function DescriptionsNumeric functions have numeric arguments and return numeric values. The trigonometricfunctions all operate on radians, not degrees. The numeric functions are arranged in alphabetical order, with descriptions and exam-ples of each one. SIGN, ROUND, and TRUNC are most commonly used numeric functions—pay particularattention to them. FLOOR, CEIL, MOD, and REMAINDER are also important functions that canappear in the test. TRUNC and ROUND functions can take numeric input or a datetime input.These two functions are discussed in the “Using Single-Row Date Functions” section toillustrate their behavior with a datetime datatype input.ABSABS(n) takes a single argument, where n is a numeric datatype (NUMBER, BINARY_FLOAT or BINARY_DOUBLE). This function returns the absolute value of n.SELECT ABS(-52) negative, ABS(52) positiveFROM dual; NEGATIVE POSITIVE---------- ---------- 52 52ACOSACOS(n) takes a single argument, where n is a numeric datatype between –1 and 1. Thisfunction returns the arc cosine of n expressed in radians, accurate to 30 digits of precision.SELECT ACOS(-1) PI, ACOS(0) ACOSZERO, ACOS(.045) ACOS045, ACOS(1) ZEROFROM dual; PI ACOSZERO ACOS045 ZERO---------- ---------- ---------- ----------3.14159265 1.57079633 1.52578113 0ASINASIN(n) takes a single argument, where n is a numeric datatype between –1 and 1. Thisfunction returns the arc sine of n expressed in radians, accurate to 30 digits of precision.SELECT ASIN(1) high, ASIN(0) middle, ASIN(-1) lowFROM dual; Using Single-Row Numeric Functions 83 HIGH MIDDLE LOW---------- ---------- ----------1.57079633 0 -1.5707963ATANATAN(n) takes a single argument, where n is a numeric datatype. This function returns thearc tangent of n expressed in radians, accurate to 30 digits of precision.SELECT ATAN(9E99) high, ATAN(0) middle, ATAN(-9E99) lowFROM dual; HIGH MIDDLE LOW---------- ---------- ----------1.57079633 0 -1.5707963ATAN2ATAN2(n1, n2) takes two arguments, where n1 and n2 are numbers. This function returnsthe arc tangent of n1 and n2 expressed in radians, accurate to 30 digits of precision.ATAN2(n1,n2) is equivalent to ATAN(n1/n2).SELECT ATAN2(9E99,1) high, ATAN2(0,3.1415) middle, ATAN2(-9E99,1) lowFROM dual; HIGH MIDDLE LOW---------- ---------- ----------1.57079633 0 -1.5707963BITANDBITAND(n1, n2) takes two arguments, where n1 and n2 are positive integers or zero. Thisfunction performs a bitwise AND operation on the two input values and returns the results,also an integer. It is used to examine bit fields. Here are two examples of BITAND. The first one performs a bitwise AND operation on 6(binary 0110) and 3 (binary 0011). The result is 2 (binary 0010). Similarly, the bitwise ANDbetween 8 (binary 1000) and 2 (binary 0010) is 0 (0000).SELECT BITAND(6,3) T1, BITAND(8,2) T2FROM dual; T1 T2---------- ---------- 2 084 Chapter 2 N Using Single-Row FunctionsCEILCEIL(n) takes a single argument, where n is a numeric datatype. This function returns thesmallest integer that is greater than or equal to n. CEIL roun ...

Tài liệu được xem nhiều: