TAILIEUCHUNG - advanced sql Functions in Oracle 10G phần 3

Một khoản đâu được thêm vào bản Tuyên Bố Chú ý rằng NƠI đã loại trừ các hàng trước khi đặt hàng cuối cùng: SELECT empno, ename, orig_salary TỪ nhân viên NƠI orig_salary Một khoản đâu được thêm vào bản Tuyên Bố Chú ý rằng NƠI đã loại trừ các hàng trước khi đặt hàng cuối cùng:SELECT empno, ename, orig_salary TỪ nhân viên NƠI orig_salary | The Analytical Functions in Oracle Analytical Functions I A SELECT with Just a FROM Clause SELECT empno ename orig_salary FROM employee Gives EMPNO ENAME ORIG_SALARY 101 John 3 102 Stephanie 35000 104 Christina 43000 108 David 37000 111 Katie 45000 106 Chloe 33000 122 Lindsey 40000 A SELECT with Ordering Note that the ordering is applied to the result set after the result is established SELECT empno ename orig_salary FROM employee ORDER BY orig_salary Gives EMPNO ENAME ORIG_SALARY 106 Chloe 33. 101 John 35000 102 Stephanie 35000 108 David 37000 122 Lindsey 40000 104 Christina 43000 111 Katie 45000 66 Chapter I A WHERE Clause Is Added to the Statement Notice that the WHERE has excluded rows before the final ordering SELECT empno ename orig_salary FROM employee WHERE orig_salary 43000 ORDER BY orig_salary Gives EMPNO ENAME ORIG_SALARY -06 c--oo 101 John 102 Stephanie 108 David 122 Lindsey 36000 35000 35000 37000 40000 Notice that ORDER BY is applied last after the SELECT . FROM . WHeRE. An Analytical Function Is Added to the Statement Note here that the WHERE is applied before the RANKO. SELECT empno ename orig_salary RANK OVER ORDER BY orig_salary rankorder FROM employee WHERE orig_salary 43000 ORDER BY orig_salary 67 The Analytical Functions in Oracle Analytical Functions I Gives EMPNO ENAME ORIG_SALARY RANKORDER C--o- 0 1 101 John 35000 2 102 Stephanie 35000 2 108 David 37000 4 122 Lindsey 40000 5 A Join Is Added to the Statement What will happen to the order of execution if a join is included in the statement We will add another table to the statement then perform a join and see what happens. Suppose we have a table called Job with this description Name Null Type EMPNO NUMBER 3 JOBTITLE VARCHAR2 20 and this data EMPNO JOBTITLE 101 Chemist 102 Accountant 102 Mediator 111 Musician 122 Director Personnel 122 Mediator 108 Mediator 106 Computer Programmer 104 Head Mediator .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.