---
title: "How to use like clause? Is it possible to use it with INT data type variable?"  
description: "How to use like clause? Is it possible to use it with INT data type variable?"  
author: "Jonas Stuart"  
published: 2016-09-30  
updated: 2016-09-30  
canonical: https://www.mindstick.com/forum/34185/how-to-use-like-clause-is-it-possible-to-use-it-with-int-data-type-variable  
category: "c#"  
tags: ["c#"]  
reading_time: 2 minutes  

---

# How to use like clause? Is it possible to use it with INT data type variable?

Hi Buddy\
How to use like [clause](https://www.mindstick.com/forum/33937/difference-between-throw-exception-and-throw-clause)? Is it possible to use it with [INT](https://www.mindstick.com/forum/159137/how-to-convert-date-int-to-date-in-sql) [data](https://www.mindstick.com/articles/13050/salesforce-aiming-to-dominate-predictive-analytics-with-data-science) type [variable](https://www.mindstick.com/articles/1807/objective-c-data-types-variables-object-creation)?[Please explain](https://www.mindstick.com/forum/344/hi-rohith-i-am-new-for-mvc-please-explain-how-to-set-implicitly-isauthenticated-true) me.I would really appreciate your help.\
Thanks\
\
\

## Replies

### Reply by Abhishek Srivasatava

Hi Jonas,

Yes, it is possible to use like command with Integer data type verified in SQL server 2008 .

\

```
SELECT *FROM Ee_empl_cat4whereprsn_intn_id  LIKE '10%'
```

\

![How to use like clause? Is it possible to use it with INT data type variable?](https://www.mindstick.com/mindstickforums/19141259-fe30-4a45-a86f-3e7e66d42690/images/46a4f306-3ab1-4ea1-a344-b644d0eb2526.png)\

\
Use of like statement with different Wildcard :

\

```
SELECT DISTICT  A.PRSN_ADHAR_NUM

FROM ADHAR

WHERE NAME LIKE 'P%' -- this statement fetch all those record whose name is start with ‘P’.

OR City LIKE '%A' -- this statement fetch all those record whose name is ends with ‘A’.

OR City LIKE '%ank%'-- this statement fetch all those adhar number whose name contains ‘ank’ in between their number.

OR City NOT LIKE 's%'

OR City LIKE ‘R_S_I_E_H’ -- this statement is used to find the city name start with R followed by any text, followed by ‘S’
followed by any text, followed by I followed by any text, followed by E followed
by any text and string last letter will be H. Wildcard ( _ )  is like a substitution for any alphabet.

OR  City  LIKE '[abc]' -- fetch all those city name which start with a,b,c.

OR  City  LIKE '[a-c]' -- fetch all those city name which start with a,b,c.
```


---

Original Source: https://www.mindstick.com/forum/34185/how-to-use-like-clause-is-it-possible-to-use-it-with-int-data-type-variable

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
