برای ارتباط با پشتیبانی سامانه سپاس با شماره 82804882 (021) تماس حاصل فرمائید.
CARDINALITY

CARDINALITY

مطالب مرتبط

Roles

Roles

توضیحات

این تابع تعداد مقادیر برای یک فیلد را مشخص می‌کند.

دستور

تابع BFILNAME به صورت زیر نوشته می‌شود:

1
CARDINALITY( nested_table_column )

.


مثال

مثالی از خروجی تابع CARDINALITY را مشاهده می‌کنیم:

1
2
3
4
5
6
7
8
9
10
11
DECLARE
type type_ntt
IS
  TABLE OF NUMBER;
  l_ntt_var1 type_ntt:=type_ntt(1,2,2,3,4,4,4,5,5,6);
  l_ntt_var2 type_ntt;
BEGIN
  dbms_output.put_line('The total count of the elements in L_NTT_VAR1 type is '||cardinality(l_ntt_var1));
  dbms_output.put_line('The total count of the distinct elements in L_NTT_VAR1 type is '||cardinality(SET(l_ntt_var1)));
  dbms_output.put_line('The total count of the elements in L_NTT_VAR2 type is '||nvl(to_char(cardinality(l_ntt_var2)),'Null'));

END;

توضیحات

این تابع تعداد مقادیر برای یک فیلد را مشخص می‌کند.

دستور

تابع BFILNAME به صورت زیر نوشته می‌شود:

1
CARDINALITY( nested_table_column )

.


مثال

مثالی از خروجی تابع CARDINALITY را مشاهده می‌کنیم:

1
2
3
4
5
6
7
8
9
10
11
DECLARE
type type_ntt
IS
  TABLE OF NUMBER;
  l_ntt_var1 type_ntt:=type_ntt(1,2,2,3,4,4,4,5,5,6);
  l_ntt_var2 type_ntt;
BEGIN
  dbms_output.put_line('The total count of the elements in L_NTT_VAR1 type is '||cardinality(l_ntt_var1));
  dbms_output.put_line('The total count of the distinct elements in L_NTT_VAR1 type is '||cardinality(SET(l_ntt_var1)));
  dbms_output.put_line('The total count of the elements in L_NTT_VAR2 type is '||nvl(to_char(cardinality(l_ntt_var2)),'Null'));
END;
0 0 رای ها
امتیازدهی به مقاله
اشتراک در
اطلاع از
guest
0 نظرات
تازه‌ترین
قدیمی‌ترین بیشترین رأی
بازخورد (Feedback) های اینلاین
مشاهده همه دیدگاه ها
0
افکار شما را دوست داریم، لطفا نظر دهید.x