Retrieve Names from Table

How to retrieve names from table starting with a particular character as a first letter, using with substring, instring without using LIKE function.

Questions by rajalingeswarrao

Showing Answers 1 - 3 of 3 Answers

Consider the table EMPLOYEES with the column ENAME. Try with the following queries.

Select ename from employees
where Instr(ename,'&A') = 1
group by ename;

'A' --> your starting character.
OR

Select ename
From employees
Where Substr(ename,1,1) = '&A')
Group By ename;

'A' --> your starting character.

OR

Select Decode(Instr(ename,'&A'),1,ename)
From employees;
The above displays the nulls but try to remove the nulls.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions