string sql="select a,b,'常量' as c from table"
注:单引号' ' 很重要,否则编译时会把其看成查询参数,从而提示参数未指定错误。
摘自:http://blog.sina.com.cn/s/blog_4d96ee050100webl.html
注:单引号' ' 很重要,否则编译时会把其看成查询参数,从而提示参数未指定错误。
摘自:http://blog.sina.com.cn/s/blog_4d96ee050100webl.html