使用SqlDataReader对象连接数据库的SQL语句的单引号和双引号
大家好,请帮个忙,SqlCommand cmd = new SqlCommand("select * from tb_User where UserName='" + name + "' and UserPwd='" + pwd + "'", conn);
我想问一下为什么SQL语句中既有单引号又有双引号啊???
他们的作用是什么啊????
感谢您的回答~~~~~~~~~~~
2009-08-02 16:18
2009-08-02 17:17
2009-08-02 17:34
2009-08-02 17:36
2009-08-02 18:31
2009-08-04 01:15
2009-08-06 13:52
2009-08-06 20:29