dcsimg
 

Submitted by: M S Sridhar(sridhar.ms@gmail.com)

Friday Aug 24th 2018 by M S Sridhar

Language: SQL, Expertise: Intermediate - See why POSITION is a powerful function in MySQL.

POSITION is a powerful function that helps you to find the position of a sub string in a string. Typically, the string is a column in a given table and we use the POSITION function to find the sub string.

Example:

SELECT POSITION('' IN ) FROM ;

This returns a column, limiting the number of records to the count of records in the given table. A positive value 0 indicates the position and also implies that the given subStr is found in the respective row. A return value of 0 (Zero) indicates that the subStr is not part of the string.

Home
Mobile Site | Full Site