I need to insert a value to table column and the string contains ' ' ' in it. For eg. Al'aK and how to do this in sql server 2008 r2?
All that for doing it from asp.net and I am trying to do it sql itself.
Insert into @table values('Al'ak',1)
I need to insert a value to table column and the string contains ' ' ' in it. For eg. Al'aK and how to do this in sql server 2008 r2?
All that for doing it from asp.net and I am trying to do it sql itself.
Insert into @table values('Al'ak',1)
Replace your ' with '' and insert
create table #tab(id int,value varchar(50))
insert into #tab values(1,'Alka''s')
select * from #tab