title: Use LIKE '%' with integer in SQL
body: <p>I have this procedure in SQl Server:</p>
  
  <pre><code>create procedure AutoSearchTeamByMobile
  @Team_Mobile int
  As
  select * from Team_Info where Team_Mobile like @Team_Mobile+'%';
  </code></pre>
  
  <p>And I have this code in C#:</p>
  
  <pre><code>private void textBoxX4_TextChanged(object sender, EventArgs e)
      {
          int tMobile= int.Parse(textBoxX4.Text);
          SqlCommand com = new SqlCommand("AutoSearchTeamByMobile", con);
          com.Parameters.Add("@Team_Mobile", SqlDbType.Int).Value = tMobile;
          com.CommandType = CommandType.StoredProcedure;
          SqlDataAdapter da = new SqlDataAdapter();
          DataSet ds = new DataSet();
          da.SelectCommand = com;
          da.Fill(ds, "Team_Info");
          dataGridViewX1.DataSource = ds.Tables["Team_Info"];
      }
  </code></pre>
  
  <p>I have a list of mobile numbers and they are saved in column called <code>Team_Mobile</code> with data type as <code>int</code>, one of them start with'711......' another one start with '700......', so now when I write in <code>textBoxX4</code> only '7' then all numbers(which start with 711 or 700) should be appears in <code>dataGridViewX1</code>, but when I write '71' then only numbers which start with '711' could be appears in <code>dataGridViewX1</code>. When I write '70' then only numbers which start with 700 should be appears in <code>dataGridViewX1</code>. I did not get what I need, actually I did not see any thing same as I did not do any thing.</p>
  
  <p>My needs, when I write 71 then all records that have 711 in Team_Mobile column should be still appear and the other number should be hide.</p>
  
  <p>But I did it with <code>Team_Names</code> and it works because the data type of <code>Team_Names</code> is <code>nvarchar</code>, but the <code>Team_Mobile</code> is <code>int</code>.</p>
  
  <p>sql:</p>
  
  <pre><code>create procedure AutoSearchTeam
  @Team_Name nvarchar (50)
  As
  select * from Team_Info where Team_Name like @Team_Name+'%';
  </code></pre>
  
  <p>C#:</p>
  
  <pre><code>    private void textBoxX1_TextChanged(object sender, EventArgs e)
      {
          string t_name = textBoxX1.Text;
          SqlCommand com = new SqlCommand("AutoSearchTeam", con);
          com.Parameters.Add("@Team_Name", SqlDbType.NVarChar, 50).Value = t_name;
          com.CommandType = CommandType.StoredProcedure;
          SqlDataAdapter da = new SqlDataAdapter();
          DataSet ds = new DataSet();
          da.SelectCommand = com;
          da.Fill(ds, "Team_Info");
          dataGridViewX1.DataSource = ds.Tables["Team_Info"];
      }
  </code></pre>
  
  <p>My question is: Is there anyway to replace <code>%</code> to use it with integer?</p>
  
  <p>What can I replace <code>%</code> to use it with integer to get what I have explained above?</p>
  
  <p>Sorry for my English language.</p>