Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to insert string that contain ' symbol?

Author  Topic 

makpandian
Starting Member

2 Posts

Posted - 2009-03-02 : 04:21:05
Hi
i want to insert a string into table.
but when i insert ,i got error invalid syntax.
bcaze the string contain some ' symbol.


how can i do it?

Mak
(Living @ Virtual World)

sridhar.dbe
Starting Member

34 Posts

Posted - 2009-03-02 : 04:29:04
declare @a table(sr varchar(10))
insert into @a values('SQl''TEAM')

select * from @a

OUT PUT
SQl'TEAM

isk
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-03-02 : 08:59:54
http://sqlblogcasts.com/blogs/madhivanan/archive/2008/02/19/understanding-single-quotes.aspx
Go to Top of Page
   

- Advertisement -