locate sql server
SELECT CHARINDEX('b','ab') //returns 2
mysql string position
POSITION(substr IN str)
mysql locate
/*return position of substring in string: 0 is no match, 1=start of string*/
SELECT LOCATE("world", "hello world");
/*will return position of bob in full_name,
0 means no bob in full_name. 1 means full_name starts with bob */
SELECT LOCATE("bob", full_name) as bob_position from users;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us