若有一 string strA=tom’s要輸入資料庫

MS-SQL為strA=strA.replace(”‘”,”/’”)

斜線單引號

postgreSQL為strA=strA.replace(”‘”,”””)

兩單引號

可在前端或後端替換皆可

--

轉自 http://chrisbalboa.pixnet.net/blog/post/27631941-%5Bsql%5D%E5%96%AE%E5%BC%95%E8%99%9F%E8%BC%B8%E5%85%A5%E8%B3%87%E6%96%99%E5%BA%AB%E8%AA%9E%E6%B3%95

arrow
arrow
    全站熱搜

    dizzy03 發表在 痞客邦 留言(0) 人氣()