Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to update a table column data, containing ( ' ) symble in data

I am getting error in microsoft sql server because the data I want to update is contains (‘) symbol in the data.

update Employee_table
set
brokername='Angie's Broker',
where ID=7788;

Please someome resolve the problem.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

For single quotes used inside a string literal, you put another single quote before it. This is called "escaping" the single quote, and different sorts of escaping are quite usual in programming:

update Employee_table
set
brokername='Angie''s Broker',
where ID=7788;
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading