View Full Version : selected a field that starts with...
i need this but in a sql format:
SELECT theField FROM tableName WHERE theField starts with the letter A
thanks
BigDaddy
10-13-2002, 11:41 PM
http://www.w3schools.com/sql/sql_where.asp
SELECT theField FROM tableName WHERE theField like 'A%'
What if i wanted to select a group like anything that starts with 0 to 9
whammy
10-15-2002, 12:43 AM
select * from scripts where title like '1%' OR title like '2%' OR title like '3%' etc.
Assuming that it's not a numeric value... you can do that like:
select * from scripts where cid > 1
That answer is so obvious... I can't believe I didn't think of that. :rolleyes:
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.