2

How can i get middle values in particular column in SQL 5.6, MySQL Workbench ie :

5014.**160201**.1200.1-2 here i need the value **160201**

Aagam Jain
  • 1,546
  • 1
  • 10
  • 18
Kishore
  • 23
  • 3

1 Answers1

1

You can get the second value, based on the period separator, using substring_index():

select substring_index(substring_index(col, '.', 2), '.', -1) as second_part
Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786