title: Sql stored procedure Like Operator variable
body: <pre><code>print("select CustomerNo, CustomerName, Address, City, State, Zip,
      Phone, Fax, ContactName, Email  
      from Customers where CustomerName like '%field%'");
  </code></pre>
  
  <p>Hi all. This is a simple question but I wasn't able to figure since I'm pretty new to tsql and sql in general.</p>
  
  <p>I use the above stored procedure to do search. My question is for '%field%'. What variable do you use or how does it work in tsql? for example, "where Customers = @CustomerNo". how about for wildcard? how do you pass in a variable along with wildcard? I guess i can do "%" + "field" + "%" in the code but is there a way not to do that?</p>