⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 product_cursor2.sql

📁 oracle 11 源代码
💻 SQL
字号:
-- This script displays the product_id, name, and
-- price columns from the products table using a cursor
-- and a FOR loop

SET SERVEROUTPUT ON

DECLARE
  CURSOR v_product_cursor IS
    SELECT product_id, name, price 
    FROM products
    ORDER BY product_id;
BEGIN
  FOR v_product IN v_product_cursor LOOP
    DBMS_OUTPUT.PUT_LINE(
      'product_id = ' || v_product.product_id ||
      ', name = ' || v_product.name ||
      ', price = ' || v_product.price
    );
  END LOOP;
END;
/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -