Program to insert a single quote in the varchar text in SQL Server using Concat Function

Posted by Rajnilari2015 under Sql Server category on | Points: 40 | Views : 1081
The below program will do so

declare @tbl table(SomeField varchar(50))
insert into @tbl(SomeField) values(concat('He is one of the leader','''s',' of this world'))
select * from @tbl


He is one of the leader's of this world


By using the concat function , we are concateting the string literals.

Comments or Responses

Login to post response