Verify if the second character is a letter in SQL -


i want put condition in query have column should contain second position alphabet.

how achieve this?

i've tried _[a-z]% in clause not working. i've tried [a-z]%.

any inputs please?

you can use regular expression matching in query. example:

select * `test` `name` regexp '^.[a-za-z].*'; 

that match name column test table against regex verifies if second character either lowercase or uppercase alphabet letter.

also see sql fiddle example of data , doesn't match.


Comments

Popular posts from this blog

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

php - Using str_replace to translate a MySQL Table in html -

SQL Server - MyCTE query based on 24 hour period (next day) -