-
Retrieve the detail from emp
Question asked by visitor siddharth
Retrieve the detail from emp table with help of ename
where ename may be in any case like (SCOTT,ScoTT, scott,scOtt)
-
Expert Member
Re: Retrieve the detail from emp
select * from emp where lower(ename)='scott'
This will do it.
-
Contributing Member
Re: Retrieve the detail from emp
Hi,
either of following:-
select * from emp where lower(ename) like '%scott%';
or
select * from emp where upper(ename) like '%SCOTT%';
Reeta
-
Expert Member
Re: Retrieve the detail from emp
Hi,
Using Case Manipulation functions (Upper, Lower, Initcap) will be more appropriate for this validation.
-
Re: Retrieve the detail from emp
if u are sure the loist contains 'scott' in any case then go for
select * from emp where lower(ename)='scott'
else try to use like search
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules