2026/6/20 13:47:13
网站建设
项目流程
国内大型免费网站建设,在线商标设计logo免费,网站建设招标采购需求,二级单位网站建设文章目录 环境症状问题原因解决方案 环境
系统平台#xff1a;Microsoft Windows (64-bit) 10 版本#xff1a;4.7.6
症状
Oracle中#xff0c;存在unique关键字来去重#xff0c;如#xff1a;
select unique name from test ;
在瀚高数据库中#xff0c;如何进行处…文章目录环境症状问题原因解决方案环境系统平台Microsoft Windows (64-bit) 10版本4.7.6症状Oracle中存在unique关键字来去重如select unique name from test ;在瀚高数据库中如何进行处理问题原因Oracle使用1、测试表及数据create table test (id int,name varchar2(30));insert into test values(1,‘aaa’);insert into test values(2,null);insert into test values(3,‘aaa’);2、测试语句及结果select unique name from test ;在oracle中是可以正常执行。瀚高数据库使用1、测试表及数据转换瀚高数据库后create table test (id int,name varchar(30));insert into test values(1,‘aaa’);insert into test values(2,null);insert into test values(3,‘aaa’);2、测试语句及结果select unique name from test ;可以看到执行时报错因为unique关键字在瀚高数据库中不存在。解决方案select distinct name from test ;把unique替换为等价的关键字distinct。Oracle中unique和distinct是等价的关键字都具有去除重复行的效果。瀚高数据库中没有unique关键字用distinct来替换即可。