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

python - No exponential form of the z-axis in matplotlib-3D-plots -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -

Why does a .NET 4.0 program produce a system.unauthorizedAccess error on a Windows Server 2012 machine with .NET 4.5 installed? -