Question

I know that I can use something like

select distinct left(table.column, 1) as firstChar
from table

In MySQL to return just the first character of a field.
The problem is I'm working with SQL Derby :( and it does not like this syntax.

Is there a way to perform this query using derby?

Était-ce utile?

La solution

select substr(table.column,1,1) 
from table
order by table.column
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top