SUBSTRING_INDEX « String « SQL / MySQL






1.To return everything to the right or left of a given character, use SUBSTRING_INDEX(str,c,n).
2.Get the second and fourth segments from the id values:
3.Prepend a sufficient number of periods to the hostname values to guarantee that they have the requisite number