shekhar_rawat shekhar_rawat - 2 months ago 6
MySQL Question

Find the SPECIFIC records in the table which have white space on second place only?

I have record table for xyz . There is a column like

0025336625


0036625336


9986698852


0 22336652


1 32236633


9333265556


8 44555223


So I only need these records fetch from the table which is in Bold only .

Answer

You can use substr for filter the column

select * 
from my_table 
where substr(my_column, 2, 1 ) = ' ';