Oracle 사용자 정의 구조(레코드)
2649 단어 Oacle
C 와 같은 사용자 정의 형식 으로 표 의 필드 집합 을 정의 할 수 있 습 니 다.
정의 형식 type recordName is Record( 필드 이름 필드 형식, 필드 이름 필드 종류 );
사용 절차:1)성명 구조 체 2)구조 체 변 수 를 정의 하 는 3)사용.
2.예:
-- record, 、 、 。
declare
--
type re_stu is record(
rname student.name%type, --
rage student.age%type --
); --
--
rw_stu re_stu;
cursor c_stu is select name,age from student;
begin
open c_stu;
loop
fetch c_stu into rw_stu; --
exit when c_stu%notfound;
dbms_output.put_line(' ='||rw_stu.rname||' ='||rw_stu.rage);
end loop;
close c_stu;
end;
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
자바 작업 은 Clob 또는 NClob 데이터 형식의 저장 프로 세 스 인 스 턴 스 를 포함 합 니 다.텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.