Page 1 of 1

How to select everything that starts with a...

Posted: Sat Apr 01, 2006 12:22 pm
by GeXus
Is there a function that will get the first character of a string in the database? I want to be able to select everything that starts with 'A', 'B', etc..

Thanks!

Posted: Sat Apr 01, 2006 4:19 pm
by timvw
Without dbms specific functions you can also select like 'A%'
Which dbms are you using? Mysql has a SUBSTRING function.

feyd | fixed link

Posted: Sat Apr 01, 2006 7:46 pm
by s.dot
mysql -> select * from table where field like 'a%'