暂无图片
返回数说广场
Murkey
暂无图片
2024-02-20
oracle11g及以上版本数据库中,按如下语句创建一张表,并插入三条数据: create table test (id number, c1 char(5), c2 varchar(5), c3 varchar2(5), c4 nvarchar2(5)); insert into test values(1, 'aa', 'aa', 'aa', 'aa'); insert into test values(2, 'bb','','','bb'); insert into test values(3, 'cc',NULL,NULL,'cc'); commit; A 使用语句:select * from test where c3 = ''; 和语句 select * from test where c3 is null; 效果是一样的,因为VARCHAR2会将空字符当做NULL处理。 B 使用语句:select * from test where length(c2)=length(c3); 只可以得到一条记录; C 使用语句:select * from test where lengthb(c3)=lengthb(c4); 只可以得到一条记录; D 使用语句:select * from test where length(c1)=length(c3); 只可以得到一条记录; E 只有使用语句:select * from test where c1='aa '; 也就是'aa'后面加3个空格才可以查询得到一条记录; B
1
暂无图片 2
648
分享

评论

热门数说