Đang chuẩn bị liên kết để tải về tài liệu:
HandBooks Professional Java-C-Scrip-SQL part 170

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Tham khảo tài liệu 'handbooks professional java-c-scrip-sql part 170', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 1.7 Loops The LOOP construct allows you to execute a sequence of statements repeatedly. There are three kind of loops simple infinite FOR and WHILE. You can use the EXIT statement to break out of LOOP and pass control to the statement following the END LOOP. 1.7.1 Simple Loop LOOP executablestatement s END LOOP The simple loop should contain an EXIT or EXIT WHEN unless you want it to execute infinitely. Use the simple loop when you want the body of the loop to execute at least once. For example LOOP FETCH company_cur INTO company_rec EXIT WHEN company_cur ROWCOUNT 5 OR company_cur NOTF OUND process_company company_cur END LOOP 1.7.2 Numeric FOR Loop FOR loop index IN REVERSE lowest_number.highest_number LOOP executablestatement s END LOOP The PL SQL runtime engine automatically declares the loop index a PLS_INTEGER variable never declare a variable with that name yourself. The lowest_number and highest_number ranges can be variables but are evaluated only once on initial entry into the loop. The REVERSE keyword causes PL SQL to start with the highest_number and decrement down to the lowest_number. For example this code BEGIN FOR counter IN 1 . 4 LOOP DBMS_OUTPUT.PUT counter END LOOP DBMS_OUTPUT.NEW_LINE FOR counter IN REVERSE 1 . 4 LOOP DBMS_OUTPUT.PUT counter END LOOP DBMS_OUTPUT.NEW_LINE END yields the following output 1234 4321 1.7.3 Cursor FOR Loop FOR record index IN cursor name SELECTstatement LOOP executablestatement s END LOOP The PL SQL runtime engine automatically declares the loop index a record of cursor_name ROWTYPE never declare a variable with that name yourself. The cursor FOR loop automatically opens the cursor fetches all rows identified by the cursor and then closes the cursor. You can embed the SELECT statement directly in the cursor FOR loop. For example FOR emp_rec IN emp_cur LOOP IF emp_rec.title Oracle Programmer THEN give_raise emp_rec. emp_id 30 END IF END LOOP 1.7.4 WHILE Loop WHILE condition LOOP executablestatement s END LOOP Use the .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.