How to escape single quotes in Sybase

╄→尐↘猪︶ㄣ 提交于 2019-12-03 23:35:08

If working with Sybase, having got used to MySQL which more database users have experience you may soon discover you are unable to escape single quotes with backslash in.

So how do you escape quotes in Sybase? In fact, in Sybase SQL the single quote acts as the escape character.

See below for an example UPDATE statement in both “languages”:

MySQL

UPDATE Animals SET NAME = 'Dog\'s friends' WHERE uid = 12

Sybase

UPDATE Animals SET NAME = 'Dog''s friends' WHERE uid = 12

I’m not entirely sure this makes sense to me (especially as it looks like a double quote) but there you go!

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