如何在将数据插入SQL表时删除特殊字符
问题描述:
我正在尝试将名称插入其中一列,coulumn的数据就像RICHARD O'NEILL,当我尝试插入数据时,它将作为RICHARD ONEILL插入。请帮我解释如何插入记录为RICHARD O'NEILL
I am trying to insert the name to one of the column the data of the coulumn is like RICHARD O'NEILL, when I try to insert the data it is getting inserted as RICHARD O"NEILL. Please help me out how to insert the record as RICHARD O'NEILL
答
使用参数化的INSERT语句。
Use a parameterized INSERT statement.