cmd.CommandText = "select * from T_number where StartNo<=@No and EndNo>=@No";
cmd.Parameters.Add(new SqlParameter("@No",txtMobileNo.Text.ToString()));
cmd.CommandText = "select * from T_number where StartNo<=@No and EndNo>=@No";
cmd.Parameters.Add(new SqlParameter("No",txtMobileNo.Text.ToString()));
为什么这两种写法都对呢 参数No 加不加@都对吗? |