Home » RDBMS Server » Server Administration » how to retrive data starts from Aa till Am from a table?
how to retrive data starts from Aa till Am from a table? [message #373181] Mon, 02 April 2001 13:53 Go to next message
Senthil
Messages: 68
Registered: December 1999
Member
how to retrive data whose value starts from Aa till Am
Re: how to retrive data starts from Aa till Am from a table? [message #373188 is a reply to message #373181] Tue, 03 April 2001 04:58 Go to previous messageGo to next message
John R
Messages: 156
Registered: March 2000
Senior Member
Select {fields}
From {Table}
where substr(column,1,2) between 'Aa' and 'Am'
Re: how to retrive data starts from Aa till Am from a table? [message #373200 is a reply to message #373181] Tue, 03 April 2001 23:11 Go to previous message
Naresh
Messages: 27
Registered: March 2001
Junior Member
Solution :

select * from

where <column_name> like 'Aa%'
or <column_name> like 'Am%';

---------------------
If based on emp table, can be written as:

select * from emp
where ename like 'Aa%'
or ename like 'Am%';

--------------------
Previous Topic: Re: How I can take avg of last 3 months
Next Topic: how to count no. of columns in a table??
Goto Forum:
  


Current Time: Mon Dec 23 06:21:09 CST 2024