INSERT() – Insert a String at a specified position in MySQL

Spread the love

INSERT() –

The INSERT() function inserts a string within a string at the specified position and for a certain number of characters.

Syntax –

INSERT(string, position, number, string2)

string – The string to modify.

position – The position to where insert the string2

number – The number of characters to replace

string2 – The string to insert into the string.

Example –

SELECT INSERT("SQL is FUN", 8, 3, "awesome") AS InsertedText;

Rating: 1 out of 5.

Leave a Reply