advanced sql Functions in Oracle 10G phần 1 doc

42 381 0
advanced sql Functions in Oracle 10G phần 1 doc

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

[...]... programming perspective to them This book will allow the Oracle user to use SQL in new and exciting ways This book contains nine chapters It begins by reviewing some of the common SQL functions and techniques to help transition into the newer tools of Oracle 10 g Chapter 1 reviews common Oracle functions Chapter 2 covers some common reporting tools in Oracle s SQL* Plus Chapter 3 introduces and discusses Oracle. .. function to find the hyperbolic sine of 30 degrees: SELECT SINH(value1*2*3 .14 16/360) FROM trig Gives: SINH(VALUE1*2*3 .14 16/360) .54785487 16 Chapter | 1 Example 2: Using the COSH function to find the hyperbolic cosine of 30 degrees: SELECT COSH(value1*2*3 .14 16/360) FROM trig Gives: COSH(VALUE1*2*3 .14 16/360) 1. 14023899 Example 3: Using the TANH function to find the hyperbolic tangent... programming language uses functions similar to those found on calculators In fact, most programming languages go far beyond the calculator functions Oracle s SQL contains a rich variety of functions We can categorize Oracle s SQL functions into simple SQL functions, numeric functions, statistical functions, string functions, and date functions In this chapter, we selectively illustrate several functions in. .. 2: Using the COS function to find the cosine of 60 degrees: SELECT COS(value2*2*3 .14 16/360) FROM trig Gives: COS(VALUE2*2*3 .14 16/360) -.499997879 Example 3: Using the TAN function to find the tangent of 30 degrees: SELECT TAN(value1*2*3 .14 16/360) FROM trig 15 Common Oracle Functions: A Function Review Gives: TAN(VALUE1*2*3 .14 16/360) -.5773 519 02 Hyperbolic Trig Functions SQL s... following description: DESC trig Will give: Name Null? - -VALUE1 VALUE2 VALUE3 14 Type NUMBER(3) NUMBER(3) NUMBER(3) Chapter | 1 And, SELECT * FROM trig Will give: VALUE1 VALUE2 VALUE3 -30 60 90 Example 1: Using the SIN function to find the sine of 30 degrees: SELECT SIN(value1*2*3 .14 16/360) FROM trig Gives: SIN(VALUE1*2*3 .14 16/360) -.5000 010 6 Example... tools into a set of topics for exploiting Oracle 10 g s SQL We have also briefly reviewed some older tools that will help transition to the new material This book mainly addresses advanced topics in SQL with a focus on SQL functions for Oracle 10 g The functions and methods we cover include the analytical functions, MODEL statements, regular expressions, and object-oriented/collection structures We also introduce... would give us: LINENO VALUE ABS(VALUE) SQRT(ABS(VALUE)) -0 9 9 3 1 3.44 3.44 1. 8547237 2 3.88 3.88 1. 9697 715 6 3 -6.27 6.27 2.503996 81 4 -6.82 6.82 2. 611 512 97 5 0 0 0 6 2.5 2.5 1. 5 811 3883 Near Value Functions These are functions that produce values near what you are looking for Examples of near value functions include: CEIL — Returns the ceiling value (next highest integer above... We review some common reporting functions in Chapter 2 Our Approach to SQL In addition to a basic knowledge of SQL, we will call attention to “our way” of developing queries in SQL The way we develop queries in SQL is often by beginning with a simple command and then building upon it until the answer is found There are different approaches to building queries in SQL as in any other language One way... to be used by Oracle professionals as well as students, but it is not a SQL primer Readers of this book are expected to have previously used Oracle, SQL* Plus, and, to some extent, PL /SQL This book can be used for individual study or reference, in advanced Oracle training settings, and in advanced xi Preface database classes in schools It is meant for those familiar with SQL programming since most of... gives: POWER(VALUE,2) - 81 Ordinary Trigonometry Functions SQL s ordinary trigonometry functions include: SIN — Returns the sine of a value COS — Returns the cosine of a value TAN — Returns the tangent of a value The SIN, COS, and TAN functions take arguments in radians where, radians = (angle * 2 * 3 .14 16 / 360) To illustrate the use of the ordinary trigonometric functions, let’s suppose we have . Functions in SQL 11 1 RATIO-TO-REPORT 11 5 Windowing Subclauses with Physical Offsets in Aggregate Analytical Functions 12 0 An Expanded Example of a Physical Window 12 7 Displaying a Running Total Using. from Wordware Publishing, Inc. Printed in the United States of America ISBN -13 : 978 -1- 59822-0 21- 6 ISBN -10 : 1- 59822-0 21- 7 10 9876543 21 06 01 Oracle is a registered trademark of Oracle Corporation. Manipulation Functions 4 Near Value Functions 7 Null Value Function 10 Log and Exponential Functions 12 Ordinary Trigonometry Functions 14 Hyperbolic Trig Functions 16 String Functions 18 The INSTR

Ngày đăng: 08/08/2014, 18:21

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan