Prepare for your Next Interview
This is a discussion on Using LIKE operator in multiple condition within the SQL forums, part of the Databases category; If we have multiple conditions to check, can we use like operator? eg where empid like ('123%') or like ('23%')?...
|
|||
|
Re: Using LIKE operator in multiple condition
The LIKE operator is used in character string comparisons with
pattern matching. If empid is defined as varchar Then select * from emp where empid like '123%' retrieve records of emp where empid starts with 123 select * from emp where empid like '23%' retrieve records of emp where empid starts with 23 |
|
|||
|
Re: Using LIKE operator in multiple condition
Like operator is used to retrieve records starting with the alphabet or numeric specified as the condition. For example,
Select * from emp where emp_name like 'Joh%' This statement will retrieve the records where the employee name starts with "Joh" |
|
|||
|
Re: Using LIKE operator in multiple condition
LIKE operator is used for pattern matching you can combine multiple statments for different conditions using logical operators.
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Output without the JOIN condition. How is it possible ? | Geek_Guest | SQL | 5 | 11-02-2007 01:17 PM |
| Calling action on condition basis | Prafullan | QTP | 2 | 11-01-2007 01:24 AM |
| Test Condition | reks_209 | Testing Templates | 3 | 09-14-2007 04:18 AM |
| I want to tune four tables and 5 joins condition | Caleb Sima and Vincent Li | Oracle | 2 | 06-29-2007 09:19 AM |
| How do I use a input variable inside like condition | BharaniAditya123 | Oracle | 1 | 06-12-2007 02:14 AM |