How do I escape a single quote in SQL Server? -
I am trying to put some text data in the table in SQL Server 9.
Text
I tried to use two single quotes, but threw me some errors.
e.g. Enter in the my_table values ('Hi, Tim of my name'.);
Single quotes are saved by doubling them , like The following SQL shows this functionality in our example that I have tested it on SQL Server 2008:
DECLARE @ my_table table ([value] VARCHAR (200)) @my_table Include in values ('Hi, my name' 'Tim.') SELECT * My_table with
result
value ======= =========== Hi, my name time
Comments
Post a Comment