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

📄 recordselect.sql

📁 Oracle 9i PL/SQL程序设计的随书源码
💻 SQL
字号:
REM RecordSelect.sql
REM Chapter 3, Oracle9i PL/SQL Programming by Scott Urman
REM This block shows how to select into a record.

DECLARE
  -- Define a record to match some fields in the students table.
  -- Note the use of %TYPE for the fields.
  TYPE t_StudentRecord IS RECORD (
    FirstName  students.first_name%TYPE,
    LastName   students.last_name%TYPE,
    Major      students.major%TYPE);

  -- Declare a variable to receive the data.
  v_Student  t_StudentRecord;
BEGIN
  -- Retrieve information about student with ID 10,000.
  -- Note how the query is returning columns which match the
  -- fields in v_Student.
  SELECT first_name, last_name, major
    INTO v_Student
    FROM students
    WHERE ID = 10000;
END;
/

⌨️ 快捷键说明

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