How can I inserting a string with a single quote in it into a DB2 table?

柔情痞子 提交于 2021-02-10 20:19:33

问题


I'm using a DB2 database.

How to insert ' (single quote) as data into a table.

For example:

Insert into EMP values ('Raju's kumar' , 10000)

where the name has a ' (single quote).


回答1:


try this (double quote)

Insert into EMP values ('Raju''s kumar' , 10000)


来源:https://stackoverflow.com/questions/44174958/how-can-i-inserting-a-string-with-a-single-quote-in-it-into-a-db2-table

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!