Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: select criteria by length
On Jul 26, 1:53 pm, PaulR <honeybeekee..._at_gmail.com> wrote:
> I know the table and column(varchar 20) I want, however I want to
> return only that data that is 7 chars or less, how would I restrict my
> query for that? Thanks
SELECT * FROM tablename
WHERE LENGTH(columname) <= 7;
Likely a function-based index would help performance? Received on Thu Jul 26 2007 - 12:37:33 CDT
![]() |
![]() |