4
,所以我試圖運行一個腳本這樣一個單引號:PostgreSQL的逃避where子句
select id
from owner
where owner.name = "john's"
,我收到此錯誤:ERROR: column "john's" does not exist
。
而且我想是這樣的:where owner.name = 'john\'s'
,但它DIT不行
任何人都知道我怎麼可以運行這樣一個查詢?
嘗試雙單引號= 「約翰的'」? – JamieD77
[在PostgreSQL中用單引號插入文本]可能重複(http://stackoverflow.com/questions/12316953/insert-text-with-single-quotes-in-postgresql) – JNevill
'e'john \'s''應該做的伎倆。 (e前綴允許在字符串文字中使用c樣式反斜槓引號(以及其他內容)) – joop