发布网友 发布时间:2022-04-09 23:58
共8个回答
懂视网 时间:2022-04-10 04:20
--1 建表
create table city_table
(
city_name varchar2(100)
,District varchar2(100)
);
--2 插入数据
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘北京‘, ‘东城区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘北京‘, ‘西城区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘北京‘, ‘崇文区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘北京‘, ‘宣武区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘北京‘, ‘朝阳区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘北京‘, ‘海淀区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘北京‘, ‘丰台区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘北京‘, ‘石景山区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘北京‘, ‘门头沟区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘北京‘, ‘房山区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘北京‘, ‘通州区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘北京‘, ‘顺义区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘北京‘, ‘昌平区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘北京‘, ‘大兴区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘北京‘, ‘怀柔区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘北京‘, ‘平谷区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘北京‘, ‘密云县‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘北京‘, ‘延庆县‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘天津‘, ‘河东区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘天津‘, ‘河西区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘天津‘, ‘南开区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘天津‘, ‘河北区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘天津‘, ‘红桥区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘天津‘, ‘塘沽区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘天津‘, ‘汉沽区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘天津‘, ‘大港区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘天津‘, ‘东丽区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘天津‘, ‘西青区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘天津‘, ‘北辰区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘天津‘, ‘津南区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘天津‘, ‘武清区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘天津‘, ‘宝坻区‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘天津‘, ‘静海县‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘天津‘, ‘宁河县‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘天津‘, ‘蓟县‘);
insert into CITY_TABLE (CITY_NAME, DISTRICT)values (‘天津‘, ‘和平区‘);
commit;
--进击吧
select city_name,wm_concat(District||chr(10))
from city_table
group by city_name;
--结果发现,里面的子信息会按照一行一行的方式进行排列(chr(13),chr(10))
chr(9)的作用是空格
ascii码chr(9),chr(10),chr(13)在oracle中的用法
标签:str oracle 天津 ble 平谷 mit 怀柔区 插入数据 ora
热心网友 时间:2022-04-10 01:28
Chr(10):ASCII码中的换行键,相当于vbLF。
Chr(13):ASCII码中的回车键,相当于vbCR。
1、在窗体输出中:
Chr(13) 、 Chr(10) 、 Chr(13)+Chr(10) 是换一行;
Chr(10)+Chr(13)、两个Chr(13)、两个Chr(10) 是换两行。
2.、在Text输出中:
只有Chr(13)+Chr(10)可换一行,其余无换行。(换行的前提是Text控件的Multiline属性设置为True)
热心网友 时间:2022-04-10 02:46
Chr(10):ASCII码中的换行键,相当于vbLF。
Chr(13):ASCII码中的回车键,相当于vbCR。
在窗体输出中:
Chr(13)、Chr(10)、Chr(13)+Chr(10)是换一行;Chr(10)+Chr(13)、两个Chr(13)、两个Chr(10)是换两行。
扩展资料:
0 到 31 之间的数字与标准的非打印 ASCII 代码相同。例如,Chr(10) 可以返回换行字符。charcode 的正常范围为 0 – 255。然而,在 DBCS 系统,charcode 的实际范围为 -32768 到 65535。
注意:ChrB 函数作用于包含在 String 中的字节数据。ChrB 总是返回一个单字节,而不是返回一个字符,一个字符可能是一个或两个字节。
参考资料来源:百度百科-Chr (数值表达式)
热心网友 时间:2022-04-10 04:20
一空行 二换装热心网友 时间:2022-04-10 06:12
换行符和空格热心网友 时间:2022-04-10 08:20
换行和空格。热心网友 时间:2022-04-10 10:44
Chr(10):ASCII码中的换行键,相当于vbLF。热心网友 时间:2022-04-10 13:26
Chr 函数