--查看整个数据库的:
select value from nls_database_parameters where parameter='NLS_SORT';
--查看当前会话的:
select value from nls_session_parameters where parameter='NLS_SORT';
字符集为中文字符集、NLS_SORT为BINARY时,汉字是按汉字拼音排序;
字符集为非中文字符集(如UTF8)、NLS_SORT为BINARY时,汉字按二进制编码(BINARY)排序。
所以,对非中文字符集库:
一 可通过设置其NLS_SORT来实现汉字的定制化排序;改变当前会话的NLS_SORT:
ALTER session SET NLS_SORT = SCHINESE_PINYIN_M
--嵌套表 和 索引表 和数组
a.索引表 不能作为表字段类型
declare
type area_table is table of number index by varchar2(20);
area_t area_table;
begin
area_t('shanghai') :=1;
area_t('wuhan') :=2;
area_t('changsha') :=3;
dbms_output.put_line(area_t.first);
dbms_output.put_line(area_t.next('changsha'));
dbms_output.put_line(area_t.last);
end;
b.嵌套表 下标从1开始,且可以作为表字段类型,在pl/sql使用前必须先构造方法初始化,元素个数无限制
1.表字段类型
create type phone_type is table of varchar2(20);
create table emp_phone(id number,phone phone_type)nested table phone store as phone_table;
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12961536/viewspace-769558/ ,如需转载,请注明出处,否则将追究法律责任。