“Charindex” Code-Antworten

Charindex

-- The CHARINDEX() function searches for a substring in a string, 
-- and returns the position. 
-- If the substring is not found, this function returns 0.

CHARINDEX(substring, string, start)

-- "start" is optional
Foolish Flatworm

Suchen Sie SQL Server

SELECT CHARINDEX('b','ab') //returns 2
Misty Mongoose

Charindex

CHARINDEX(substring, string, start)
Kalineo

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen