Oracle 10g - Escape quote in insert statement

前端 未结 3 1013
遇见更好的自我
遇见更好的自我 2021-01-23 02:40

I am trying to insert people\'s height into a database in the form of 5\'9

How do I properly escape the quote so I can do this. My insert statement looks like this so fa

3条回答
  •  滥情空心
    2021-01-23 02:59

    I hate double quoting, it's a mess. Luckely these days we have the quote operator:

    q'{delimiter}string{delimiter}'
    
    INSERT INTO height(id, height) 
    VALUES(height-seq.nexval, q'#5'9#');
    

提交回复
热议问题