记得在C#中可以使用 string= @"\\202.115"来表示\\202.115那么在SQL语句中有没有类似 的东西呢?比如我要把 "you're not alone"更新到数据库中,
update movie set title = 'you're not alone '
这样就不行,有没有什么简单的办法可以解决这个问题?比如有没有
update movie set title = @'you're not alone ' 这样的说法呢?谢谢了。
update movie set title = 'you're not alone '
这样就不行,有没有什么简单的办法可以解决这个问题?比如有没有
update movie set title = @'you're not alone ' 这样的说法呢?谢谢了。
唯一特例的就是这个'
要用''
string sSql = "...Set Name=?...";
SqlParameter sqlParam = new SqlParameter(...);
sqlParam.Value = "you're not alone ";
update movie set title = 'you''re not alone '
update movie set title = 'you''re not alone '
把'转义,sql中'好比在c#中\