標量型別與復合型別

2021-09-27 13:45:03 字數 1009 閱讀 5300

1.記錄型別

定義語法:

type type_nameis record(field_declare[,]field_declare...);

identifiertype_name

說明:type_name 為我們定義的結構體變數型別,identifier 為需要使用的結構體變數。

如:declare

type emp_record_type is record(empno emp.empno%type,ename emp.ename%type);

emp_record emp_record_type;

2.表型別

定義語法:

typetable_name_typeis table of element_type index by key_type;

identifiertable_name_type

說明:table_name_type 用於指定索引表型別,element_type用於指定索引表元素的資料型別,key_type用於指定索引元素下標的資料型別。(注意:使用時不能直接隊表變數進行賦值,要帶上下標),下標型別有(binary_integer,pls_integer,varchar2)

例如:declare

type emp_table_type is table of emp%rowtype;

emp_table emp_table_type;

begin

select * into emp_table(-1) from emp where empno='1001';

dbsm_output.put_line(emp_table(-1).ename);

end;

GraphQL 標量型別

標量 scalartypedefinition 是 graphql 中不可分割的原子資料型別,在服務中充當葉子節點。對於客戶端而言,合法的查詢集 select set 必須到達葉子節點,也就是到達標量型別節點。graphql 規範提供了五種標量 int 32 位有符號整型,超出精度範圍後,引擎會丟擲...

python復合型別 python復合型別

鏈結 list python的列表的特點 可以隨時新增和刪除元素 可以做的操作有 切片,新增,刪除,查詢,修改,排序 列表元素可以是不同型別,在型別不同的情況下就無法排序 列表是有序的 定義小馬列表 li twilight pinkiepie rainbow dash 插入 insert self ...

復合型別資料

1 記錄型別 自定義record型別 declare type example record type is record name emp.ename type,salary emp.salary type,dno emp.deptno type 宣告record型別變數 example reco...